LAST_ARG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… LAST_ARG(9) β€” the Kernel API Manual glow-up

okay bestie, welcome to LAST_ARG β€” yeah it's a section 9 kernel API page, don't panic, it's literally one of the smol ones 🫢 (that (9) at the top is just the manual section, no cap).


✨ NAME ✨

LAST_ARG β€” returns the last argument. that's it. that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

LAST_ARG (args... );

✨ ARGUMENTS ✨

  • args β€” the arguments, bestie. plural. use them wisely πŸ’…

✨ DESCRIPTION ✨

so here's the tea β˜• β€” this helper macro lets you manipulate the argument list before you pass it along to the next level macro. it's giving backstage-pass-for-your-args energy πŸ”₯

and like COUNT_ARGS, this macro works up to 12 arguments. twelve. that's the ceiling, don't come for her with thirteen πŸ™ˆ


✨ EXAMPLE ✨

#define foo     X,Y,Z,Q #define bar     LAST_ARG(foo)

with the definitions above, bar expands to Q. slay. queen of being last πŸ’…πŸ‘‘


✨ SEE ALSO ✨

the whole friend group lives in the kernel file ./drivers/gpu/drm/xe/xe_args.h πŸ¦‹ β€” go say hi to:


okay that's the whole page, you ate that honestly 🌈

mwah πŸ’– this lil masterpiece lives in ./drivers/gpu/drm/xe, dropped October 2026, and it's part of the Kernel API Manual (that's the LAST_ARG(9) energy right there). go forth and grab your last arg, icon βœ¨πŸ‘‘

πŸ“¦ where this page comes from