|
| 1 | +From 212f7a3e399fa3f6c695f54abccda5967c697aba Mon Sep 17 00:00:00 2001 |
| 2 | +From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> |
| 3 | +Date: Mon, 31 Oct 2022 12:44:09 +0100 |
| 4 | +Subject: [PATCH 9/9] bonding (gcc13): synchronize bond_{a,t}lb_xmit() types |
| 5 | + |
| 6 | +Both bond_alb_xmit() and bond_tlb_xmit() produce a valid warning with |
| 7 | +gcc-13: |
| 8 | + drivers/net/bonding/bond_alb.c:1409:13: error: conflicting types for 'bond_tlb_xmit' due to enum/integer mismatch; have 'netdev_tx_t(struct sk_buff *, struct net_device *)' ... |
| 9 | + include/net/bond_alb.h:160:5: note: previous declaration of 'bond_tlb_xmit' with type 'int(struct sk_buff *, struct net_device *)' |
| 10 | + |
| 11 | + drivers/net/bonding/bond_alb.c:1523:13: error: conflicting types for 'bond_alb_xmit' due to enum/integer mismatch; have 'netdev_tx_t(struct sk_buff *, struct net_device *)' ... |
| 12 | + include/net/bond_alb.h:159:5: note: previous declaration of 'bond_alb_xmit' with type 'int(struct sk_buff *, struct net_device *)' |
| 13 | + |
| 14 | +I.e. the return type of the declaration is int, while the definitions |
| 15 | +spell netdev_tx_t. Synchronize both of them to the latter. |
| 16 | + |
| 17 | +Cc: Martin Liska <mliska@suse.cz> |
| 18 | +Cc: Jay Vosburgh <j.vosburgh@gmail.com> |
| 19 | +Cc: Veaceslav Falico <vfalico@gmail.com> |
| 20 | +Cc: Andy Gospodarek <andy@greyhouse.net> |
| 21 | +Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> |
| 22 | +Link: https://lore.kernel.org/r/20221031114409.10417-1-jirislaby@kernel.org |
| 23 | +Signed-off-by: Jakub Kicinski <kuba@kernel.org> |
| 24 | +(cherry picked from commit 777fa87c7682228e155cf0892ba61cb2ab1fe3ae) |
| 25 | +--- |
| 26 | + include/net/bond_alb.h | 4 ++-- |
| 27 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 28 | + |
| 29 | +diff --git a/include/net/bond_alb.h b/include/net/bond_alb.h |
| 30 | +index 191c36afa1f4..9dc082b2d543 100644 |
| 31 | +--- a/include/net/bond_alb.h |
| 32 | ++++ b/include/net/bond_alb.h |
| 33 | +@@ -156,8 +156,8 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave); |
| 34 | + void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave); |
| 35 | + void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link); |
| 36 | + void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave); |
| 37 | +-int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev); |
| 38 | +-int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev); |
| 39 | ++netdev_tx_t bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev); |
| 40 | ++netdev_tx_t bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev); |
| 41 | + struct slave *bond_xmit_alb_slave_get(struct bonding *bond, |
| 42 | + struct sk_buff *skb); |
| 43 | + struct slave *bond_xmit_tlb_slave_get(struct bonding *bond, |
| 44 | +-- |
| 45 | +2.42.0 |
| 46 | + |
0 commit comments