Commit e208cd5e authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

net: qede: Use FIELD_SIZEOF directly instead of reimplementing its function

FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore,
We prefer to use the macro rather than calculating its value.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f195efb4
...@@ -440,7 +440,7 @@ struct qede_fastpath { ...@@ -440,7 +440,7 @@ struct qede_fastpath {
struct qede_tx_queue *txq; struct qede_tx_queue *txq;
struct qede_tx_queue *xdp_tx; struct qede_tx_queue *xdp_tx;
#define VEC_NAME_SIZE (sizeof(((struct net_device *)0)->name) + 8) #define VEC_NAME_SIZE (FIELD_SIZEOF(struct net_device, name) + 8)
char name[VEC_NAME_SIZE]; char name[VEC_NAME_SIZE];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment