From e74b96c282dc762836b38ad91b91996eedf26240 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 11 Jun 2023 16:11:27 +0200 Subject: [PATCH] 5.4-stable patches added patches: bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch --- ...-synchronize-bond_-a-t-lb_xmit-types.patch | 45 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 46 insertions(+) create mode 100644 queue-5.4/bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch diff --git a/queue-5.4/bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch b/queue-5.4/bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch new file mode 100644 index 00000000000..e32cd508d0d --- /dev/null +++ b/queue-5.4/bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch @@ -0,0 +1,45 @@ +From 777fa87c7682228e155cf0892ba61cb2ab1fe3ae Mon Sep 17 00:00:00 2001 +From: "Jiri Slaby (SUSE)" +Date: Mon, 31 Oct 2022 12:44:09 +0100 +Subject: bonding (gcc13): synchronize bond_{a,t}lb_xmit() types + +From: Jiri Slaby (SUSE) + +commit 777fa87c7682228e155cf0892ba61cb2ab1fe3ae upstream. + +Both bond_alb_xmit() and bond_tlb_xmit() produce a valid warning with +gcc-13: + 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 *)' ... + include/net/bond_alb.h:160:5: note: previous declaration of 'bond_tlb_xmit' with type 'int(struct sk_buff *, struct net_device *)' + + 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 *)' ... + include/net/bond_alb.h:159:5: note: previous declaration of 'bond_alb_xmit' with type 'int(struct sk_buff *, struct net_device *)' + +I.e. the return type of the declaration is int, while the definitions +spell netdev_tx_t. Synchronize both of them to the latter. + +Cc: Martin Liska +Cc: Jay Vosburgh +Cc: Veaceslav Falico +Cc: Andy Gospodarek +Signed-off-by: Jiri Slaby (SUSE) +Link: https://lore.kernel.org/r/20221031114409.10417-1-jirislaby@kernel.org +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + include/net/bond_alb.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/include/net/bond_alb.h ++++ b/include/net/bond_alb.h +@@ -156,8 +156,8 @@ int bond_alb_init_slave(struct bonding * + void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave); + void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link); + void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave); +-int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev); +-int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev); ++netdev_tx_t bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev); ++netdev_tx_t bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev); + void bond_alb_monitor(struct work_struct *); + int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr); + void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id); diff --git a/queue-5.4/series b/queue-5.4/series index 6f4f7c79e0f..158515200ba 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -31,3 +31,4 @@ rbd-move-rbd_obj_flag_copyup_enabled-flag-setting.patch pinctrl-meson-axg-add-missing-gpioa_18-gpio-group.patch usb-usbfs-enforce-page-requirements-for-mmap.patch usb-usbfs-use-consistent-mmap-functions.patch +bonding-gcc13-synchronize-bond_-a-t-lb_xmit-types.patch -- 2.47.2