projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f195efb
)
net: qede: Use FIELD_SIZEOF directly instead of reimplementing its function
author
zhong jiang
<zhongjiang@huawei.com>
Wed, 19 Sep 2018 11:32:13 +0000
(19:32 +0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 20 Sep 2018 03:58:05 +0000
(20:58 -0700)
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: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede.h
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/qlogic/qede/qede.h
b/drivers/net/ethernet/qlogic/qede/qede.h
index 6a4d266fb8e2126f724cd4dbcfed3e02433c5d65..de98a974673b3e542a9af878cede821c7a04cf5b 100644
(file)
--- a/
drivers/net/ethernet/qlogic/qede/qede.h
+++ b/
drivers/net/ethernet/qlogic/qede/qede.h
@@
-440,7
+440,7
@@
struct qede_fastpath {
struct qede_tx_queue *txq;
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];
};