hfi1_rcd_get_by_index_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hiii bestie πŸ’– welcome to the hfi1_rcd_get_by_index_safe(9) page from the Kernel API Manual. This one is short and sweet: it’s the safe little vibe-check wrapper that validates the ctxt index before the code goes poking at the array ✨

πŸŽ€ NAME πŸŽ€

hfi1_rcd_get_by_index_safe β€” validate the ctxt index before accessing the array πŸ’…

🌸 SYNOPSIS 🌸

struct hfi1_ctxtdata * hfi1_rcd_get_by_index_safe (struct hfi1_devdata
*dd , u16 ctxt );

πŸ’… ARGUMENTS πŸ’…

  • dd β€” pointer to a valid devdata structure. Valid is the whole point, bestie 🫢
  • ctxt β€” the index of an possilbe rcd. And yes, possilbe is literally the spelling on the page β€” keeping it 100% as-is 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

This is a wrapper for hfi1_rcd_get_by_index to validate that the given ctxt index is valid. It’s giving β€œlook before you leap” in kernel form β€” no touching the array until that index has passed the vibe check πŸ’…βœ¨

The caller is responsible for making the _put. Periodt. Don’t forget the _put, bestie β€” that’s the rule πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/infiniband/hw/hfi1/init.c is where the whole friend group lives. Go say hi to:


mwah πŸ’‹ β€” signed off from source/version ./drivers/infiniband/hw/hfi1 / Kernel API Manual, dated October 2026. That’s the whole page, bestie β€” go validate those indexes responsibly 🫢🌈

πŸ“¦ where this page comes from