attr_current_value_show(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ attr_current_value_show(9) ✨

okay bestie, welcome to the Kernel API Manual section 9 page for attr_current_value_show β€” yes it's a mouthful, no I won't be shortening it, we respect the full name in this house πŸ’…


🌸 NAME 🌸

attr_current_value_show β€” literally just "get the current value of the given attribute", that's it, that's the whole gig πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

ssize_t attr_current_value_show (struct kobject *kobj , struct
kobj_attribute *kattr , char *buf , struct tunable_attr_01 *tunable_attr
);

πŸ’– ARGUMENTS πŸ’–

  • kobj β€” pointer to the driver object 🫢
  • kattr β€” pointer to the attribute that's calling this function, like hi bestie you rang?
  • buf β€” the buffer we're gonna write to ✍️
  • tunable_attr β€” the attribute that's, yep, being read πŸ‘‘

⭐ DESCRIPTION ⭐

So what it does: it retrieves the value of the given attribute for the current smartfan profile. And where does that current smartfan profile come from? The lenovo-wmi-gamezone driver, obviously πŸ’β€β™€οΈ

This function is intentionally generic β€” like, main character energy but reusable energy β€” so it can be called from any integer attribute's "_show" function. no cap, any of them 🌈

And if the WMI is success, the sysfs attribute gets notified πŸ“£βœ¨


πŸ”₯ RETURN πŸ”₯

Either the number of characters written to buf, or an error code. that's the vibe check 😭


πŸ‘‘ SEE ALSO πŸ‘‘

The kernel file ./drivers/platform/x86/lenovo/wmi-other.c β€” go look at it, iykyk πŸ“‚

bestie that's a lot of siblings but they're all iconic in their own way, don't play favorites πŸ’€

anyway that's the whole page πŸŽ€ it lives over in ./drivers/platform/x86/lenovo, dated October 2026 β€” yes, from the future, we stay ahead πŸ’œ bye ily, go read your sysfs attributes responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from