ctucan_get_berr_counter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ctucan_get_berr_counter πŸ’…

okay so this is a page from the Kernel API Manual, section 9, and it's literally all about ctucan_get_berr_counter β€” the error counter routine. yes bestie, we're in the kernel now, put your hair up πŸŽ€


🌸 NAME 🌸

ctucan_get_berr_counter β€” the error counter routine, periodt ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int ctucan_get_berr_counter (const struct net_device *ndev , struct
can_berr_counter *bec );

like... it's giving "two pointers and a return value", and honestly? iconic 😌


πŸ’– ARGUMENTS πŸ’–

  • ndev β€” pointer to the net_device structure 🫢
  • bec β€” pointer to the can_berr_counter structure 🫢

that's it. two args. main character energy fr fr.


✨ DESCRIPTION ✨

so basically this is the driver error counter routine. that's the whole description. no notes, she said what she said πŸ’…πŸ”₯


🌈 RETURN 🌈

  • 0 on success πŸŽ€
  • a failure value on error 😭

(not me telling you to check the return value β€” but like, check the return value πŸ‘€)


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group shows up for this one, no cap:


bestie reminder: this is section 9, kernel-space territory β€” read the whole squad before you go poking at error counters, mwah πŸ’œ

and that's the page!! sign-off time: this one lives at ./drivers/net/can/ctucanfd, dated October 2026, and it's ctucan_get_berr_counter(9) from the Kernel API Manual β€” slay, go read the source, iykyk πŸ§šβ€β™€οΈπŸ’«πŸŒΈ

πŸ“¦ where this page comes from