module_param_hw_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 module_param_hw_array(9) 🌸

okay so bestie, this one lives in the Kernel API Manual β€” welcome to the kernel-param corner of the group chat, it's giving very niche but very iconic πŸ’…


✨ NAME ✨

module_param_hw_array β€” it's literally a parameter that represents an array of hw parameters. no cap, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

module_param_hw_array (name , type , hwtype , nump , perm );

that's the shape of it, periodt ✨


πŸ’– ARGUMENTS πŸ’–

  • name β€” the name of the array variable, bestie. it's name. iconic behavior, honestly 🫢
  • type β€” the type, as per module_param β€” so whatever rules apply over there apply here too, iykyk
  • hwtype β€” what the value actually represents (enum hwparam_type) πŸ‘‘
  • nump β€” an optional pointer that gets filled in with the number written. optional!! so don't stress if you don't need it 🌸
  • perm β€” visibility in sysfs β€” this is the little window where everyone can peek at your param πŸ‘€

⭐ DESCRIPTION ⭐

so the tea is: input and output are as comma-separated values πŸ“

but β€” and listen, this is the important part β€” commas inside values don't work properly 😭 like, for real. eg. an array of charp. so keep your commas strictly business, no commas inside the commas, fr fr.

also! ARRAY_SIZE(name) is used to determine the number of elements in the array β€” which means the definition must be visible. no hiding it, bestie, she needs to see it to count it πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, gathered for you, in a single kernel file β€” ./include/linux/moduleparam.h 🧚

ok that's the entire list, nobody gets left out in this household πŸ’œ

and that's the page!! mwah πŸ’‹ this one ships with the kernel docs out of ./include/linux, from the October 2026 edition of the Kernel API Manual β€” go off and register your hw param arrays, bestie, you're gonna slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from