Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4046815rwb; Sun, 9 Oct 2022 16:46:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6bqmD9+NtC4j4F8Jkqflp5M3IOYwaXXZQzju1+x16J39qni+2Uct+S3uooWSCy0cC/V/10 X-Received: by 2002:a17:902:da81:b0:178:1d8b:6cb4 with SMTP id j1-20020a170902da8100b001781d8b6cb4mr16903297plx.43.1665359172483; Sun, 09 Oct 2022 16:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665359172; cv=none; d=google.com; s=arc-20160816; b=z7aAkTbZLQS+gbKbDbz1pdIE4IBHQtYN1KfydwV+Ha4BSeMG69+zItjl8vFT5zfW4n +YQaw2XdZ7TXl7ew/mfOmcEzDNO7Hv0DtLnwn1kcUs/8EI6m0mFNKc2G9c4KVaKZx0eR U0wni+Ay3EPgnDWmULT5nmohxLLm52B/SXwSM/fCU4HbEIzPOnuwwyj3snhs9o62bXBI qCJKGsFzGNUcGaXaeP9JE0ls4v0H74s0IiLGCAlOG6LBtC2CAPXLqZMgoZJY/dWsBSqD L13LwMaaD6xsYkzj/qHDArGTvHo3555eVzCsgPsDCpuCEp0I0bJMxO4XSx8LgYFaH12Y DdCA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JSkPP4PW5tuopDhz+NcxXbUtwck5e3UCKwV96SvHhcY=; b=Lf+47TkILvnqTAnGV1Ni4ujdNIOT07bYmtkwXyHEFvjdKE2XOaYy2yDt0HxQyAt9LC FGzBHr1i3Y+D8gZPFL4Ke6thJHfzz3nuGyYcdjclH3iXYFNv56W2IA7r+dY9QU923shv 4BIXdOZ02F5F6FR8xhGQWRli4jGXf1gGpCd0McMBlxqkm6aunlUpD8y4Ytrtu+SmIQX1 Hn74UNIq3Ok1xc8tj/HxLQ3BUZtyp9L2c4fwQakk5qrE2n/1UHhntJ+rvAs0vCUVu0ok 2wAUSl80TH07SgYfHO0/SKdU96bBxnvkdWXiVe9cm0AQVwSv0P7ADjs2ZOYJAjPSf6wy 1uNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fIQx0skP; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903120f00b0017c59fa6b65si12290274plh.597.2022.10.09.16.46.01; Sun, 09 Oct 2022 16:46:12 -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=fIQx0skP; 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 S231612AbiJIWXH (ORCPT + 99 others); Sun, 9 Oct 2022 18:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbiJIWVx (ORCPT ); Sun, 9 Oct 2022 18:21:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DB781CB2E; Sun, 9 Oct 2022 15:17:21 -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 9E3A5B80DDB; Sun, 9 Oct 2022 22:11:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F68CC433D7; Sun, 9 Oct 2022 22:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353503; bh=drDk/Q5G58QaH21cmrlVgYMK81JcWEHdkp3sIMzdQGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fIQx0skP3ajc88P2V1NVpN4+BznHWSaVuhqVN+2x2fq1G75SPPVQ9ZTx+KEiJ8Giw f+K1PlmazvMXTiN6AZgdRjeraChHiFOnRsurdrphJdm9IjcXgtI53WtINovdCcSasJ ZqBvq39fvATP+R7cCInZJNko7hc80ogfUtvQorP3g2CyjglwcLtX2BMiJ08f+8yeS5 HbkFdlNI8tK7+d7PFSLyMBA0XHTzaspAcsa/FLNtL0K3n7oo61h8EjTpp0pyBk1aIM sPxfWby5AMhe35RP0+X+7QgHapotjfEjumcHeCqB+joWnUVz2QZww4eq6BMcDG0znG LIl07mSpGxWyw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Nathan Chancellor , Jakub Kicinski , Sasha Levin , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, ndesaulniers@google.com, prabhakar.mahadev-lad.rj@bp.renesas.com, mkl@pengutronix.de, shayagr@amazon.com, chi.minghao@zte.com.cn, bigunclemax@gmail.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.0 47/77] net: ethernet: ti: davinci_emac: Fix return type of emac_dev_xmit Date: Sun, 9 Oct 2022 18:07:24 -0400 Message-Id: <20221009220754.1214186-47-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009220754.1214186-1-sashal@kernel.org> References: <20221009220754.1214186-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.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 From: Nathan Huckleberry [ Upstream commit 5972ca946098487c5155fe13654743f9010f5ed5 ] The ndo_start_xmit field in net_device_ops is expected to be of type netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of emac_dev_xmit should be changed from int to netdev_tx_t. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220912195023.810319-1-nhuck@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/ti/davinci_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 2a3e4e842fa5..e203a5984f03 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -949,7 +949,7 @@ static void emac_tx_handler(void *token, int len, int status) * * Returns success(NETDEV_TX_OK) or error code (typically out of desc's) */ -static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) { struct device *emac_dev = &ndev->dev; int ret_code; -- 2.35.1