devm_ghes_r...ord_notifier(9)
π devm_ghes_r...ord_notifier(9) β like, the Kernel API Manual edition, bestie β¨
okay so picture this: you're deep in the kernel, you've got a device, you've got a notifier block, and you want them bonded for life β and by life I mean the device's lifetime, which is the whole point here. this is the managed version, the one where you don't have to remember to clean up after yourself. it's giving responsible queen energy π
β¨ NAME β¨
devm_ghes_register_vendor_record_notifier β device-managed vendor record notifier registration πΈ
like literally, device-managed. the device handles the vibes, the cleanup, all of it. you just register and go π¦
π SYNOPSIS π
int devm_ghes_register_vendor_record_notifier (struct device *dev ,
struct notifier_block *nb );
yep, that's the whole signature. two args, one int coming back at you. no cap π
π ARGUMENTS π
devβ the device that owns the notifier's lifetime π«Ά like, this is the main character here; when it goes away, the notifier registration goes away with it. no lingering, no ghosting, we love to see it.nbβ pointer to thenotifier_blockstructure of the vendor record handler π₯ this is the actual handler, the one doing the work. you're handing over a pointer and trusting the device to keep it alive for as long as it needs to be, iykyk.
β RETURN β
0 on success π and a negative errno on failure π β so like, check it, bestie. don't just assume it worked. 0 is the slay outcome, anything negative means something went sideways and you should absolutely not ignore it.
π SEE ALSO π
- Kernel file
./include/acpi/ghes.hβ go read it, it's where all this lives π ghes_register_vendor_record_notifier(9)β the non-devm sibling, the one that does not handle cleanup for you πghes_unregister_vendor_record_notifier(9)β its counterpart, for when you're doing the manual-lifetime thing π
ngl, the whole point of thedevm_prefix is that you get the cleanup behavior tied to the device. if you're out here expecting that from the plainghes_register_...version, you're gonna have a bad time π
and that's the tea β this lil page comes to you straight out of ./include/acpi π, from the October 2026 era of the Kernel API Manual β periodt, go register some notifiers responsibly, bestie ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms