Skip to content

Commit c593642

Browse files
bpankajlkees
authored andcommitted
treewide: Use sizeof_field() macro
Replace all the occurrences of FIELD_SIZEOF() with sizeof_field() except at places where these are defined. Later patches will remove the unused definition of FIELD_SIZEOF(). This patch is generated using following script: EXCLUDE_FILES="include/linux/stddef.h|include/linux/kernel.h" git grep -l -e "\bFIELD_SIZEOF\b" | while read file; do if [[ "$file" =~ $EXCLUDE_FILES ]]; then continue fi sed -i -e 's/\bFIELD_SIZEOF\b/sizeof_field/g' $file; done Signed-off-by: Pankaj Bharadiya <[email protected]> Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Kees Cook <[email protected]> Signed-off-by: Kees Cook <[email protected]> Acked-by: David Miller <[email protected]> # for net
1 parent e437232 commit c593642

File tree

115 files changed

+298
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+298
-298
lines changed

Documentation/process/coding-style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ Similarly, if you need to calculate the size of some structure member, use
988988

989989
.. code-block:: c
990990
991-
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
991+
#define sizeof_field(t, f) (sizeof(((t*)0)->f))
992992
993993
There are also min() and max() macros that do strict type checking if you
994994
need them. Feel free to peruse that header file to see what else is already

Documentation/translations/it_IT/process/coding-style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ struttura, usate
10051005

10061006
.. code-block:: c
10071007
1008-
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
1008+
#define sizeof_field(t, f) (sizeof(((t*)0)->f))
10091009
10101010
Ci sono anche le macro min() e max() che, se vi serve, effettuano un controllo
10111011
rigido sui tipi. Sentitevi liberi di leggere attentamente questo file

Documentation/translations/zh_CN/process/coding-style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ inline gcc 也可以自动使其内联。而且其他用户可能会要求移除
826826

827827
.. code-block:: c
828828
829-
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
829+
#define sizeof_field(t, f) (sizeof(((t*)0)->f))
830830
831831
还有可以做严格的类型检查的 min() 和 max() 宏,如果你需要可以使用它们。你可以
832832
自己看看那个头文件里还定义了什么你可以拿来用的东西,如果有定义的话,你就不应

arch/arc/kernel/unwind.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ do { \
4242

4343
#define EXTRA_INFO(f) { \
4444
BUILD_BUG_ON_ZERO(offsetof(struct unwind_frame_info, f) \
45-
% FIELD_SIZEOF(struct unwind_frame_info, f)) \
45+
% sizeof_field(struct unwind_frame_info, f)) \
4646
+ offsetof(struct unwind_frame_info, f) \
47-
/ FIELD_SIZEOF(struct unwind_frame_info, f), \
48-
FIELD_SIZEOF(struct unwind_frame_info, f) \
47+
/ sizeof_field(struct unwind_frame_info, f), \
48+
sizeof_field(struct unwind_frame_info, f) \
4949
}
5050
#define PTREGS_INFO(f) EXTRA_INFO(regs.f)
5151

arch/powerpc/net/bpf_jit32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
9797
#ifdef CONFIG_SMP
9898
#ifdef CONFIG_PPC64
9999
#define PPC_BPF_LOAD_CPU(r) \
100-
do { BUILD_BUG_ON(FIELD_SIZEOF(struct paca_struct, paca_index) != 2); \
100+
do { BUILD_BUG_ON(sizeof_field(struct paca_struct, paca_index) != 2); \
101101
PPC_LHZ_OFFS(r, 13, offsetof(struct paca_struct, paca_index)); \
102102
} while (0)
103103
#else
104104
#define PPC_BPF_LOAD_CPU(r) \
105-
do { BUILD_BUG_ON(FIELD_SIZEOF(struct task_struct, cpu) != 4); \
105+
do { BUILD_BUG_ON(sizeof_field(struct task_struct, cpu) != 4); \
106106
PPC_LHZ_OFFS(r, 2, offsetof(struct task_struct, cpu)); \
107107
} while(0)
108108
#endif

arch/powerpc/net/bpf_jit_comp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
321321
ctx->seen |= SEEN_XREG | SEEN_MEM | (1<<(K & 0xf));
322322
break;
323323
case BPF_LD | BPF_W | BPF_LEN: /* A = skb->len; */
324-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4);
324+
BUILD_BUG_ON(sizeof_field(struct sk_buff, len) != 4);
325325
PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, len));
326326
break;
327327
case BPF_LDX | BPF_W | BPF_ABS: /* A = *((u32 *)(seccomp_data + K)); */
@@ -333,16 +333,16 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
333333

334334
/*** Ancillary info loads ***/
335335
case BPF_ANC | SKF_AD_PROTOCOL: /* A = ntohs(skb->protocol); */
336-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
336+
BUILD_BUG_ON(sizeof_field(struct sk_buff,
337337
protocol) != 2);
338338
PPC_NTOHS_OFFS(r_A, r_skb, offsetof(struct sk_buff,
339339
protocol));
340340
break;
341341
case BPF_ANC | SKF_AD_IFINDEX:
342342
case BPF_ANC | SKF_AD_HATYPE:
343-
BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
343+
BUILD_BUG_ON(sizeof_field(struct net_device,
344344
ifindex) != 4);
345-
BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
345+
BUILD_BUG_ON(sizeof_field(struct net_device,
346346
type) != 2);
347347
PPC_LL_OFFS(r_scratch1, r_skb, offsetof(struct sk_buff,
348348
dev));
@@ -365,17 +365,17 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
365365

366366
break;
367367
case BPF_ANC | SKF_AD_MARK:
368-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
368+
BUILD_BUG_ON(sizeof_field(struct sk_buff, mark) != 4);
369369
PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
370370
mark));
371371
break;
372372
case BPF_ANC | SKF_AD_RXHASH:
373-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
373+
BUILD_BUG_ON(sizeof_field(struct sk_buff, hash) != 4);
374374
PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
375375
hash));
376376
break;
377377
case BPF_ANC | SKF_AD_VLAN_TAG:
378-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
378+
BUILD_BUG_ON(sizeof_field(struct sk_buff, vlan_tci) != 2);
379379

380380
PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
381381
vlan_tci));
@@ -388,7 +388,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
388388
PPC_ANDI(r_A, r_A, 1);
389389
break;
390390
case BPF_ANC | SKF_AD_QUEUE:
391-
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
391+
BUILD_BUG_ON(sizeof_field(struct sk_buff,
392392
queue_mapping) != 2);
393393
PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
394394
queue_mapping));

arch/sparc/net/bpf_jit_comp_32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,19 @@ do { \
180180

181181
#define emit_loadptr(BASE, STRUCT, FIELD, DEST) \
182182
do { unsigned int _off = offsetof(STRUCT, FIELD); \
183-
BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(void *)); \
183+
BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(void *)); \
184184
*prog++ = LDPTRI | RS1(BASE) | S13(_off) | RD(DEST); \
185185
} while (0)
186186

187187
#define emit_load32(BASE, STRUCT, FIELD, DEST) \
188188
do { unsigned int _off = offsetof(STRUCT, FIELD); \
189-
BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u32)); \
189+
BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u32)); \
190190
*prog++ = LD32I | RS1(BASE) | S13(_off) | RD(DEST); \
191191
} while (0)
192192

193193
#define emit_load16(BASE, STRUCT, FIELD, DEST) \
194194
do { unsigned int _off = offsetof(STRUCT, FIELD); \
195-
BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u16)); \
195+
BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u16)); \
196196
*prog++ = LD16I | RS1(BASE) | S13(_off) | RD(DEST); \
197197
} while (0)
198198

@@ -202,7 +202,7 @@ do { unsigned int _off = offsetof(STRUCT, FIELD); \
202202
} while (0)
203203

204204
#define emit_load8(BASE, STRUCT, FIELD, DEST) \
205-
do { BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u8)); \
205+
do { BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u8)); \
206206
__emit_load8(BASE, STRUCT, FIELD, DEST); \
207207
} while (0)
208208

arch/x86/kernel/fpu/xstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static void __init setup_xstate_features(void)
259259
xmm_space);
260260

261261
xstate_offsets[XFEATURE_SSE] = xstate_sizes[XFEATURE_FP];
262-
xstate_sizes[XFEATURE_SSE] = FIELD_SIZEOF(struct fxregs_state,
262+
xstate_sizes[XFEATURE_SSE] = sizeof_field(struct fxregs_state,
263263
xmm_space);
264264

265265
for (i = FIRST_EXTENDED_XFEATURE; i < XFEATURE_MAX; i++) {

block/blk-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,9 +1792,9 @@ int __init blk_dev_init(void)
17921792
{
17931793
BUILD_BUG_ON(REQ_OP_LAST >= (1 << REQ_OP_BITS));
17941794
BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
1795-
FIELD_SIZEOF(struct request, cmd_flags));
1795+
sizeof_field(struct request, cmd_flags));
17961796
BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
1797-
FIELD_SIZEOF(struct bio, bi_opf));
1797+
sizeof_field(struct bio, bi_opf));
17981798

17991799
/* used for unplugging and affects IO latency/throughput - HIGHPRI */
18001800
kblockd_workqueue = alloc_workqueue("kblockd",

crypto/adiantum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,10 @@ static int adiantum_init_tfm(struct crypto_skcipher *tfm)
436436

437437
BUILD_BUG_ON(offsetofend(struct adiantum_request_ctx, u) !=
438438
sizeof(struct adiantum_request_ctx));
439-
subreq_size = max(FIELD_SIZEOF(struct adiantum_request_ctx,
439+
subreq_size = max(sizeof_field(struct adiantum_request_ctx,
440440
u.hash_desc) +
441441
crypto_shash_descsize(hash),
442-
FIELD_SIZEOF(struct adiantum_request_ctx,
442+
sizeof_field(struct adiantum_request_ctx,
443443
u.streamcipher_req) +
444444
crypto_skcipher_reqsize(streamcipher));
445445

crypto/essiv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static int essiv_aead_init_tfm(struct crypto_aead *tfm)
347347
if (IS_ERR(aead))
348348
return PTR_ERR(aead);
349349

350-
subreq_size = FIELD_SIZEOF(struct essiv_aead_request_ctx, aead_req) +
350+
subreq_size = sizeof_field(struct essiv_aead_request_ctx, aead_req) +
351351
crypto_aead_reqsize(aead);
352352

353353
tctx->ivoffset = offsetof(struct essiv_aead_request_ctx, aead_req) +

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ device_initcall(efi_load_efivars);
681681
{ name }, \
682682
{ prop }, \
683683
offsetof(struct efi_fdt_params, field), \
684-
FIELD_SIZEOF(struct efi_fdt_params, field) \
684+
sizeof_field(struct efi_fdt_params, field) \
685685
}
686686

687687
struct params {

drivers/infiniband/hw/efa/efa_verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static inline bool is_rdma_read_cap(struct efa_dev *dev)
145145
}
146146

147147
#define field_avail(x, fld, sz) (offsetof(typeof(x), fld) + \
148-
FIELD_SIZEOF(typeof(x), fld) <= (sz))
148+
sizeof_field(typeof(x), fld) <= (sz))
149149

150150
#define is_reserved_cleared(reserved) \
151151
!memchr_inv(reserved, 0, sizeof(reserved))

drivers/infiniband/hw/hfi1/sdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ static const struct rhashtable_params sdma_rht_params = {
848848
.nelem_hint = NR_CPUS_HINT,
849849
.head_offset = offsetof(struct sdma_rht_node, node),
850850
.key_offset = offsetof(struct sdma_rht_node, cpu_id),
851-
.key_len = FIELD_SIZEOF(struct sdma_rht_node, cpu_id),
851+
.key_len = sizeof_field(struct sdma_rht_node, cpu_id),
852852
.max_size = NR_CPUS,
853853
.min_size = 8,
854854
.automatic_shrinking = true,

drivers/infiniband/hw/hfi1/verbs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ enum {
107107
HFI1_HAS_GRH = (1 << 0),
108108
};
109109

110-
#define LRH_16B_BYTES (FIELD_SIZEOF(struct hfi1_16b_header, lrh))
110+
#define LRH_16B_BYTES (sizeof_field(struct hfi1_16b_header, lrh))
111111
#define LRH_16B_DWORDS (LRH_16B_BYTES / sizeof(u32))
112-
#define LRH_9B_BYTES (FIELD_SIZEOF(struct ib_header, lrh))
112+
#define LRH_9B_BYTES (sizeof_field(struct ib_header, lrh))
113113
#define LRH_9B_DWORDS (LRH_9B_BYTES / sizeof(u32))
114114

115115
/* 24Bits for qpn, upper 8Bits reserved */

drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct vnic_stats {
6363
};
6464
};
6565

66-
#define VNIC_STAT(m) { FIELD_SIZEOF(struct opa_vnic_stats, m), \
66+
#define VNIC_STAT(m) { sizeof_field(struct opa_vnic_stats, m), \
6767
offsetof(struct opa_vnic_stats, m) }
6868

6969
static struct vnic_stats vnic_gstrings_stats[] = {

drivers/md/raid5-ppl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ int ppl_init_log(struct r5conf *conf)
13601360
return -EINVAL;
13611361
}
13621362

1363-
max_disks = FIELD_SIZEOF(struct ppl_log, disk_flush_bitmap) *
1363+
max_disks = sizeof_field(struct ppl_log, disk_flush_bitmap) *
13641364
BITS_PER_BYTE;
13651365
if (conf->raid_disks > max_disks) {
13661366
pr_warn("md/raid:%s PPL doesn't support over %d disks in the array\n",

drivers/media/platform/omap3isp/isppreview.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ static const struct preview_update update_attrs[] = {
753753
preview_config_luma_enhancement,
754754
preview_enable_luma_enhancement,
755755
offsetof(struct prev_params, luma),
756-
FIELD_SIZEOF(struct prev_params, luma),
756+
sizeof_field(struct prev_params, luma),
757757
offsetof(struct omap3isp_prev_update_config, luma),
758758
}, /* OMAP3ISP_PREV_INVALAW */ {
759759
NULL,
@@ -762,55 +762,55 @@ static const struct preview_update update_attrs[] = {
762762
preview_config_hmed,
763763
preview_enable_hmed,
764764
offsetof(struct prev_params, hmed),
765-
FIELD_SIZEOF(struct prev_params, hmed),
765+
sizeof_field(struct prev_params, hmed),
766766
offsetof(struct omap3isp_prev_update_config, hmed),
767767
}, /* OMAP3ISP_PREV_CFA */ {
768768
preview_config_cfa,
769769
NULL,
770770
offsetof(struct prev_params, cfa),
771-
FIELD_SIZEOF(struct prev_params, cfa),
771+
sizeof_field(struct prev_params, cfa),
772772
offsetof(struct omap3isp_prev_update_config, cfa),
773773
}, /* OMAP3ISP_PREV_CHROMA_SUPP */ {
774774
preview_config_chroma_suppression,
775775
preview_enable_chroma_suppression,
776776
offsetof(struct prev_params, csup),
777-
FIELD_SIZEOF(struct prev_params, csup),
777+
sizeof_field(struct prev_params, csup),
778778
offsetof(struct omap3isp_prev_update_config, csup),
779779
}, /* OMAP3ISP_PREV_WB */ {
780780
preview_config_whitebalance,
781781
NULL,
782782
offsetof(struct prev_params, wbal),
783-
FIELD_SIZEOF(struct prev_params, wbal),
783+
sizeof_field(struct prev_params, wbal),
784784
offsetof(struct omap3isp_prev_update_config, wbal),
785785
}, /* OMAP3ISP_PREV_BLKADJ */ {
786786
preview_config_blkadj,
787787
NULL,
788788
offsetof(struct prev_params, blkadj),
789-
FIELD_SIZEOF(struct prev_params, blkadj),
789+
sizeof_field(struct prev_params, blkadj),
790790
offsetof(struct omap3isp_prev_update_config, blkadj),
791791
}, /* OMAP3ISP_PREV_RGB2RGB */ {
792792
preview_config_rgb_blending,
793793
NULL,
794794
offsetof(struct prev_params, rgb2rgb),
795-
FIELD_SIZEOF(struct prev_params, rgb2rgb),
795+
sizeof_field(struct prev_params, rgb2rgb),
796796
offsetof(struct omap3isp_prev_update_config, rgb2rgb),
797797
}, /* OMAP3ISP_PREV_COLOR_CONV */ {
798798
preview_config_csc,
799799
NULL,
800800
offsetof(struct prev_params, csc),
801-
FIELD_SIZEOF(struct prev_params, csc),
801+
sizeof_field(struct prev_params, csc),
802802
offsetof(struct omap3isp_prev_update_config, csc),
803803
}, /* OMAP3ISP_PREV_YC_LIMIT */ {
804804
preview_config_yc_range,
805805
NULL,
806806
offsetof(struct prev_params, yclimit),
807-
FIELD_SIZEOF(struct prev_params, yclimit),
807+
sizeof_field(struct prev_params, yclimit),
808808
offsetof(struct omap3isp_prev_update_config, yclimit),
809809
}, /* OMAP3ISP_PREV_DEFECT_COR */ {
810810
preview_config_dcor,
811811
preview_enable_dcor,
812812
offsetof(struct prev_params, dcor),
813-
FIELD_SIZEOF(struct prev_params, dcor),
813+
sizeof_field(struct prev_params, dcor),
814814
offsetof(struct omap3isp_prev_update_config, dcor),
815815
}, /* Previously OMAP3ISP_PREV_GAMMABYPASS, not used anymore */ {
816816
NULL,
@@ -828,13 +828,13 @@ static const struct preview_update update_attrs[] = {
828828
preview_config_noisefilter,
829829
preview_enable_noisefilter,
830830
offsetof(struct prev_params, nf),
831-
FIELD_SIZEOF(struct prev_params, nf),
831+
sizeof_field(struct prev_params, nf),
832832
offsetof(struct omap3isp_prev_update_config, nf),
833833
}, /* OMAP3ISP_PREV_GAMMA */ {
834834
preview_config_gammacorrn,
835835
preview_enable_gammacorrn,
836836
offsetof(struct prev_params, gamma),
837-
FIELD_SIZEOF(struct prev_params, gamma),
837+
sizeof_field(struct prev_params, gamma),
838838
offsetof(struct omap3isp_prev_update_config, gamma),
839839
}, /* OMAP3ISP_PREV_CONTRAST */ {
840840
preview_config_contrast,

drivers/media/v4l2-core/v4l2-ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ struct v4l2_ioctl_info {
26522652
/* Zero struct from after the field to the end */
26532653
#define INFO_FL_CLEAR(v4l2_struct, field) \
26542654
((offsetof(struct v4l2_struct, field) + \
2655-
FIELD_SIZEOF(struct v4l2_struct, field)) << 16)
2655+
sizeof_field(struct v4l2_struct, field)) << 16)
26562656
#define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16)
26572657

26582658
#define DEFINE_V4L_STUB_FUNC(_vidioc) \

drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ struct xgbe_stats {
129129

130130
#define XGMAC_MMC_STAT(_string, _var) \
131131
{ _string, \
132-
FIELD_SIZEOF(struct xgbe_mmc_stats, _var), \
132+
sizeof_field(struct xgbe_mmc_stats, _var), \
133133
offsetof(struct xgbe_prv_data, mmc_stats._var), \
134134
}
135135

136136
#define XGMAC_EXT_STAT(_string, _var) \
137137
{ _string, \
138-
FIELD_SIZEOF(struct xgbe_ext_stats, _var), \
138+
sizeof_field(struct xgbe_ext_stats, _var), \
139139
offsetof(struct xgbe_prv_data, ext_stats._var), \
140140
}
141141

0 commit comments

Comments
 (0)