[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241103103142.4ba70d58@kernel.org>
Date: Sun, 3 Nov 2024 10:31:42 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: Vladimir Oltean <olteanv@...il.com>, Andrew Morton
<akpm@...ux-foundation.org>, Eric Dumazet <edumazet@...gle.com>, Paolo
Abeni <pabeni@...hat.com>, Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>, Masahiro Yamada
<masahiroy@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next v2 3/9] lib: packing: add pack_fields() and
unpack_fields()
On Fri, 25 Oct 2024 17:04:55 -0700 Jacob Keller wrote:
> +ifdef CONFIG_PACKING_CHECK_FIELDS_1
> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_1
> +endif
> +ifdef CONFIG_PACKING_CHECK_FIELDS_2
> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_2
> +endif
[...]
> +ifdef CONFIG_PACKING_CHECK_FIELDS_49
> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_49
> +endif
> +ifdef CONFIG_PACKING_CHECK_FIELDS_50
> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_50
This series is marked as Not Applicable in PW. Not sure why.
I can't bring myself to revive it, tho, this isn't pretty.
It'd be one thing to do the codegen and the ugly copy / paste
50 times in the lib/ but all drivers have to select all field
counts they use..
Since all you want is compile time checking and logic is quite
well constrained - can we put the field definitions in a separate
ro section and make modpost validate them?
Also Documentation needs to be extended with basic use examples.
Powered by blists - more mailing lists