DROP_FIRST_ARG(9)
π DROP_FIRST_ARG(9) β the Kernel API Manual one, bestie β¨
okay so picture this: you're deep in the kernel, you've got a whole little squad of arguments, and you need to introduce them to the next macro β but the first one? she's not invited. that's literally this page. welcome to the Kernel API Manual, section 9, and this macro is the friend who knows exactly who to uninvite from the group chat π«Ά
β¨ NAME β¨
DROP_FIRST_ARG β returns all arguments except the first one. yes that's it. that's the whole job. and she does it flawlessly π
π SYNOPSIS π
DROP_FIRST_ARG (args... );
πΈ ARGUMENTS πΈ
argsβ the arguments. just... the arguments. all of them, in a row, being arguments π¦
π DESCRIPTION π
so this helper macro is your little backstage pass situation: it lets you manipulate the argument list before you pass it along to the next level of macro. think of it like fixing your bestie's hair before she goes on stage β the next macro gets the glow-up version, minus whoever was standing first in line π
β EXAMPLE β
ok so here's the vibe:
#define foo X,Y,Z,Q
#define bar CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo))
with the definitions above, bar expands to 3. no cap. foo brought four friends, DROP_FIRST_ARG said "not you" to the first one, and COUNT_ARGS counted what was left. three. slay π₯
π¦ SEE ALSO π¦
the whole friend group lives in the kernel file ./drivers/gpu/drm/xe/xe_args.h:
go say hi. they're all iconic π
and that's the whole page, bestie π brought to you from ./drivers/gpu/drm/xe, timestamped October 2026, in the Kernel API Manual β mwah, see u in the next manpage ππβ¨
π¦ 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