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 44B63C4332F for ; Sun, 9 Oct 2022 22:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233657AbiJIWzo (ORCPT ); Sun, 9 Oct 2022 18:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233533AbiJIWwO (ORCPT ); Sun, 9 Oct 2022 18:52:14 -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 C72DC491E0; Sun, 9 Oct 2022 15:28:15 -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 E1A86B80DCE; Sun, 9 Oct 2022 22:27:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92E64C433D6; Sun, 9 Oct 2022 22:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665354446; bh=1bNP4EmIcz0SpH4vZwkcj/U88YswRqzZsP+/Z8V7mXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CLrepkrlxKz9W0hCPZm4ILJJovGYrp34fktPJ4sUSb8zx5AJ/qUJwfj4vVLT47ELK l1bRkTo9WGcM/o7rnTEE13k3G1wDpnY85tJI+q492xYQTK51fQ+TmNsJQWh0sGViyM 3E4OQACpSNZvyzE42XLmsQ3wEzq3KaVqWLWuA84S/rKkYkB9E8253dHr1Iz7Q+Pr5u F3EehSClBrfurPejw1BYpo2+S8z7brpgXGvI7szNvpWHHaBDL5TF2A7sQG0hykCdmX B4ffKPEyZjzF/eZYa9oPnAnPS4WyX/OzmGz1zJgOcXPz3uANxBDnM4CXciSNZOfQuw 7eF0KWkZWhUpQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: GUO Zihua , Jakub Kicinski , Sasha Levin , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, olek2@wp.pl, rdunlap@infradead.org, yangyingliang@huawei.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 06/16] net: lantiq_etop: Fix return type for implementation of ndo_start_xmit Date: Sun, 9 Oct 2022 18:27:02 -0400 Message-Id: <20221009222713.1220394-6-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009222713.1220394-1-sashal@kernel.org> References: <20221009222713.1220394-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 c8ef3c94bda0e21123202d057d4a299698fa0ed9 ] 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. ltq_etop_tx() 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/20220902081521.59867-1-guozihua@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/lantiq_etop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index a167fd7ee13e..f9bff9c5d93e 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -473,7 +473,7 @@ ltq_etop_stop(struct net_device *dev) return 0; } -static int +static netdev_tx_t ltq_etop_tx(struct sk_buff *skb, struct net_device *dev) { int queue = skb_get_queue_mapping(skb); -- 2.35.1