From patchwork Mon Oct 31 11:44:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 13229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2262225wru; Mon, 31 Oct 2022 04:46:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4GcaZc49xfiqr3gF6OgaJfyH2AGsCzDczcGYqRig1Ilcn5X9CHDeXX6UX9Earz3cz8Bokq X-Received: by 2002:a17:906:9c83:b0:779:c14c:55e4 with SMTP id fj3-20020a1709069c8300b00779c14c55e4mr12369308ejc.619.1667216778987; Mon, 31 Oct 2022 04:46:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667216778; cv=none; d=google.com; s=arc-20160816; b=Z3lIwV/Ne75u4/C154ku7RPCcHhv1Oe/0zmVWNBEJ3poavnwIgG+gyaShss7AYrMTv BpXf3KIdXfZI7gbKdsjQtWihY9oGtanLatWmYJ/fev0zzpy1T+kAD0dpv+RgB3G4lip8 VKZdKrwC9J5vMr9/bfcEwf8z3//6X2apdGWffhTnvW0wyCoFt6uOTMVeUPg+gXq1YZeC eVykDWQ3hRzGOIKpUk13rla5Q+Km25yNQ+kX8cDrXJJGEiKGwSNoh9zhWMylTzDIejF1 bAFhm2XUaol8qzb+V5d+Ol6hggcu4jGlLSw5m/YGFIr3oPTyp5bawCJA0AC/dHkcADi2 s8wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4oZGU1UBqfSVLQX+1pwkI/q8LPUG3Mvj+gEIZYe5oEA=; b=Tna+KV882mcOmF9XMp2opvSzMkIU6Sds5bv0MhuwwkyJbFxPpI/i/gxi0P6grwrsmp lPeOQ5FS7M24Me2OanPglWc8iDQKYbt49XrUQUlJDR2iyJT/69vNbT71szZ00nBSnBhZ QXhmFwxs0AoLqY7+/x5wFkD68krNYThndy2dYF7B2Yv5WdpE0QG1cCj67VoQUBaEZ0KT h7/C4m3ewAhR2KCrbCXax4BUdN5Z5alXP98EuQWbuXilGsi+061O/7exWhVS12QJgX6b NBAaJGdFGGFQNyzcvbmc+e61IouNpgi56nB2phfgXrN3hki3f+5SZIkDknZKyoW9y8ju psZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kspjBtIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020aa7c394000000b00456b734ceebsi6827945edq.436.2022.10.31.04.45.53; Mon, 31 Oct 2022 04:46:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kspjBtIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbiJaLos (ORCPT + 99 others); Mon, 31 Oct 2022 07:44:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbiJaLoS (ORCPT ); Mon, 31 Oct 2022 07:44:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75EA0E0ED; Mon, 31 Oct 2022 04:44:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2F4A1B815F0; Mon, 31 Oct 2022 11:44:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87A4FC433C1; Mon, 31 Oct 2022 11:44:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667216653; bh=EMzbD4B5bfnKfJkZGRgtgkLVwrwh+JQ4S/pXYPWRlME=; h=From:To:Cc:Subject:Date:From; b=kspjBtIZxgn6e+oCSNlrBpC6ANeXeD52Ho7ocYN0+kV6fQxetHIuKQc/M1v/0cTpy 3f1MLE6hPHBhaedF0Pu90juiH6CMDTykij3hgMO3uO8pJTyTgy6PsbrsrPguHD5GJM RTWB8CWzYAeHJIr1KqyhVLczfKMIpch0ppFnjKSidpISMPKXYzL102sWdS4vscn1aZ dDWBmp0PlDZNAXZFwitGGAcktWiELRkp+rrY/MoAjUPYTjqBO1VnZ8Izeqx1ulYBF8 kXwvw5npEUPA5Et3AJyj0Xeubtw4gN9l/hrGnNm3s8NNlQkZBI/nIFcKxT/HOKFaEv qMihU4G5jfBig== From: "Jiri Slaby (SUSE)" To: j.vosburgh@gmail.com Cc: linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Martin Liska , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Subject: [PATCH] bonding (gcc13): synchronize bond_{a,t}lb_xmit() types Date: Mon, 31 Oct 2022 12:44:09 +0100 Message-Id: <20221031114409.10417-1-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748203501222988509?= X-GMAIL-MSGID: =?utf-8?q?1748203501222988509?= 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 Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) --- include/net/bond_alb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/bond_alb.h b/include/net/bond_alb.h index 191c36afa1f4..9dc082b2d543 100644 --- a/include/net/bond_alb.h +++ b/include/net/bond_alb.h @@ -156,8 +156,8 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave); 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); struct slave *bond_xmit_alb_slave_get(struct bonding *bond, struct sk_buff *skb); struct slave *bond_xmit_tlb_slave_get(struct bonding *bond,