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 76EC7C433F5 for ; Sun, 9 Oct 2022 22:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232638AbiJIWrM (ORCPT ); Sun, 9 Oct 2022 18:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232643AbiJIWpQ (ORCPT ); Sun, 9 Oct 2022 18:45:16 -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 D3AD55F95; Sun, 9 Oct 2022 15:23:28 -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 416E6B80DD0; Sun, 9 Oct 2022 22:23:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1A0EC433D6; Sun, 9 Oct 2022 22:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665354207; bh=mD+OmwO366IiyeVy3KhqUk71aV/ndDdkQcdKKSej6yM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nmu6X3RMXlkrbIUjxSOmiJuDiC1xVSndpArf6yoSiet+6+Q8hBrqU+0MVEa7twDjM 6P1Js2Zj08QwWdmlYt13vEvvChe+j7UTEwovh12CGeUsyqIk5wludLDpHkCtmg1jlh HR3PFKNYK/PscaKew0Fp3exI3u1SZ8gVgKJf+CLbsfxPFO8IWhq6i86wUqSYmCMEnK b0h5/hmkROKyrrf7sEIOFPb5oWrVWIhGfIO9mNp5oJq86jaY4taQemmVDKXNiY6FbT nTFONwAx5XNQkOTUaYDnPg6HS1ksDqEr1Nn9G2KCnrTPC/qAD0h0ImyDq0wZMptKuE WH3FSURno84qQ== 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 5.4 10/29] net: lantiq_etop: Fix return type for implementation of ndo_start_xmit Date: Sun, 9 Oct 2022 18:22:45 -0400 Message-Id: <20221009222304.1218873-10-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: netdev@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 6e73ffe6f928..46fd128a16a1 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -451,7 +451,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