Skip to content

Commit

Permalink
modpost: remove DEF_FIELD_ADDR_VAR() macro
Browse files Browse the repository at this point in the history
With the former cleanups in do_pnp_card_entries(), this macro is no
longer used by anyone.

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Nov 27, 2024
1 parent d92b7a3 commit c4d1a9f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions scripts/mod/file2alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,12 @@ struct devtable {
#define DEF_FIELD(m, devid, f) \
typeof(((struct devid *)0)->f) f = TO_NATIVE(*(typeof(f) *)((m) + OFF_##devid##_##f))

/* Define a variable v that holds the address of field f of struct devid
* based at address m. Due to the way typeof works, for a field of type
* T[N] the variable has type T(*)[N], _not_ T*.
*/
#define DEF_FIELD_ADDR_VAR(m, devid, f, v) \
typeof(((struct devid *)0)->f) *v = ((m) + OFF_##devid##_##f)

/* Define a variable f that holds the address of field f of struct devid
* based at address m. Due to the way typeof works, for a field of type
* T[N] the variable has type T(*)[N], _not_ T*.
*/
#define DEF_FIELD_ADDR(m, devid, f) \
DEF_FIELD_ADDR_VAR(m, devid, f, f)
typeof(((struct devid *)0)->f) *f = ((m) + OFF_##devid##_##f)

#define ADD(str, sep, cond, field) \
do { \
Expand Down

0 comments on commit c4d1a9f

Please sign in to comment.