cros_ec_check_result(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cros_ec_check_result(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ today we're looking at cros_ec_check_result and honestly? she's a tiny little legend. let's get into it 🫢


🌸 NAME 🌸

cros_ec_check_result β€” literally just checks ec_msg->result. that's it. that's the whole job. iconic minimalism πŸ’…


✨ SYNOPSIS ✨

int cros_ec_check_result (struct cros_ec_device *ec_dev , struct
cros_ec_command *msg );

look at her go 😭 so simple, so clean, so coder-core πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ec_dev β€” the EC device in question, aka the main character of this whole situation πŸ‘‘
  • msg β€” the message we're checking. yes bestie, that one. go check it πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: the ChromeOS EC drivers use this function to peek at ec_msg->result, specifically to look for EC_RES_IN_PROGRESS and to warn about it. it's giving "just doing a lil vibe check on the return value" 🌈

⚠️ and this part is important, like fr fr β€” the function should not check for furthermore error codes. otherwise? it would break the ABI. and we do not break the ABI in this house πŸ’€ full stop, periodt.

πŸ”₯ RETURN πŸ”₯

  • -EAGAIN if ec_msg->result == EC_RES_IN_PROGRESS πŸ‘€
  • otherwise, 0 ✨ simple as that bestie

🧚 SEE ALSO 🧚

kernel file: ./drivers/platform/chrome/cros_ec_proto.c β€” go read it, iykyk πŸ“–

and the whole friend group of related functions, slay:


okay that's the whole page bestie, you ate that πŸ’…βœ¨

this little drop came to you from ./drivers/platform/chrome, dated October 2026, and the header up top is cros_ec_check_result(9) β€” mwah, love u, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from