From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60FD0C433FE for ; Sun, 9 Oct 2022 22:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbiJIWwQ (ORCPT ); Sun, 9 Oct 2022 18:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233461AbiJIWtJ (ORCPT ); Sun, 9 Oct 2022 18:49:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 357A14661F; Sun, 9 Oct 2022 15:25:18 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 58F0F60DD3; Sun, 9 Oct 2022 22:23:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C81C1C433D7; Sun, 9 Oct 2022 22:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665354202; bh=H6dgBSEGJUWolBib4RHuZfRSaf0MwDFoHhor54LklPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PYDFlD3KfVsoDFy2hmTKOaY7N4ejDQGOsxuDyo1JzmrQOxlU7T7dUi9MqlGmQ4C56 ViikvZvizPFQpjef/CYTS0rKirqwQKLmYmdZhG6eepEtwO7cDv8PM7wZk9E8SF5EcG 4oCNNxibBe1IfKlAJsQfY225/QMyXKZHMJI7xvYFIUljAdAoM68kkZC+fiMRfZKaz1 JMBgVO/DGRmyj/haiOOcjFKjSumihpQNQYbouUb0urdlopipAemhx8lYVqA6ZvxThl ZvEeqLRoUecVd0X6EL3sCC74VtzqLoRcl5L3Po+WeVOp3FX1u4mnCWagl4XuQj0jC+ SjF2KH+CasbVg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: GUO Zihua , Jakub Kicinski , Sasha Levin , khalasa@piap.pl, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 09/29] net: xscale: Fix return type for implementation of ndo_start_xmit Date: Sun, 9 Oct 2022 18:22:44 -0400 Message-Id: <20221009222304.1218873-9-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009222304.1218873-1-sashal@kernel.org> References: <20221009222304.1218873-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: GUO Zihua [ Upstream commit 0dbaf0fa62329d9fe452d9041a707a33f6274f1f ] Since Linux now supports CFI, it will be a good idea to fix mismatched return type for implementation of hooks. Otherwise this might get cought out by CFI and cause a panic. eth_xmit() would return either NETDEV_TX_BUSY or NETDEV_TX_OK, so change the return type to netdev_tx_t directly. Signed-off-by: GUO Zihua Link: https://lore.kernel.org/r/20220902081612.60405-1-guozihua@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index d4e095d0e8f1..26b5811e7263 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -821,7 +821,7 @@ static void eth_txdone_irq(void *unused) } } -static int eth_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t eth_xmit(struct sk_buff *skb, struct net_device *dev) { struct port *port = netdev_priv(dev); unsigned int txreadyq = port->plat->txreadyq; -- 2.35.1