Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4061095rwb; Sun, 9 Oct 2022 17:04:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM41itKovL5ZUYNQP0UqJqU3W5/0yY7wl32/7zoap56ofB1zZ0gSW4e7zBLEyPn2eBYaZlHB X-Received: by 2002:a17:90b:3a8d:b0:20a:dbde:2d49 with SMTP id om13-20020a17090b3a8d00b0020adbde2d49mr17186502pjb.243.1665360292604; Sun, 09 Oct 2022 17:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665360292; cv=none; d=google.com; s=arc-20160816; b=A8EdZs5x3zXqIqxK/30QToTKQSX/KWO8YRQyysjFxzcW/nmuNBFU+isvV8zJEUR3WW u3Snvqw5jpc6BxEtB4a07xp2qp+fwz+2tYso4wjh+/hVjdeBBWmfuEb+j7qFnNHkSacg bS9AEvE7auWFzHuFMnWfkt4jpp3yPgMPKDIwmPLNdA4fw3+ZUD9B1m2o4ExkA9ZNb7x3 k2IfZurgMEERE/hBstCkJ+Rsg59OD/g1q5RZ+ir9WaCJEmw5vkB/S4htlbcaTrEQBWFg Sk4qxTSATX/7F9TcSiLg6XX+kT19O1U+At3lzPOtnXdGyQ6Uv2PzbInbysCRlguhSg5V YW+A== 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=3VuF/obFgE/BP6AAKHw3Ut1ZkDQDkgvp/I9NHVsSARg=; b=CW/nRUDG3cliKkzHNTQS3sjBEf+sNeHwZmYwX3Hnjoi6LCdIer9mEmYi8/PxawnxuL 4b0sl5THaCWcK6in+3iASx8E4dWmlPSQuon2qn63jYhFjU5/2h/ViaE1RggRfPEc1mU5 D5k/aEwAaxLzZ5HP7Nx5CprLhpGdqBSiGii/tc6eEc5Pq+eEIaNd+lRa24IRXtDl1/Yv UDTjznV80xH4xdgVt+Qs6h+w1mRsxaT0W6wTGZElEHpW2ojjzgNsClZgX8LMfhB4e5UW fM4uBe7HrLsk0nq/+YXZ1oFfmrK3BkAsxYTchfFvktx3RvFjaGGpG9iUW60AzO1/bpgz 2aOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LZy3QzGI; 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 i1-20020a170902c94100b00172e069021dsi10733191pla.469.2022.10.09.17.04.40; Sun, 09 Oct 2022 17:04:52 -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=LZy3QzGI; 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 S232039AbiJIW0s (ORCPT + 99 others); Sun, 9 Oct 2022 18:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231874AbiJIWZF (ORCPT ); Sun, 9 Oct 2022 18:25:05 -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 AE315371B9; Sun, 9 Oct 2022 15:18: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 57014B80E01; Sun, 9 Oct 2022 22:16:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00C03C43470; Sun, 9 Oct 2022 22:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353793; bh=JF8IQTbsC6N87DfSyshxttKLI6W3enf94RRTRa+ZpgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZy3QzGIMiu8ZAJAi7TxAe5/gqojCl/CImR4eiJFchIzbUIj4PirGLhRwAQkm6fV8 Kqh0Uj2YQv2AzrTARzHDolz8migIyNqGgPb5Xg16AvCmZJ7A6TlsLOPjiexwNL3aKP 7koj8XAfZgRtrckbBMFxemQxFi8RKyXxdtZETEuBDssOGy8IKhcCCtJwBv2TJMEUIq BVh1GuDxdKc6tyURG6d3TDvlSsRIzjMKWa7BBnCVeSaSiplGPKRo/JG74BvlyxN6l1 blD0wlVFdBAIUy5F/CCAo36KdSeyZVyDFhd3BSVmzBCatTCtK/mrU6MAq/Ii+LRqYp 1s4GOpCtqnbpg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: GUO Zihua , Jakub Kicinski , Sasha Levin , wellslutw@gmail.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 27/73] net: sunplus: Fix return type for implementation of ndo_start_xmit Date: Sun, 9 Oct 2022 18:14:05 -0400 Message-Id: <20221009221453.1216158-27-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009221453.1216158-1-sashal@kernel.org> References: <20221009221453.1216158-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: GUO Zihua [ Upstream commit 7b620e156097028e4c9b6481a84ec1e1e72877ca ] 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. spl2sw_ethernet_start_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/20220902081550.60095-1-guozihua@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/sunplus/spl2sw_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sunplus/spl2sw_driver.c b/drivers/net/ethernet/sunplus/spl2sw_driver.c index 3773ce5e12cc..dbbb3727040f 100644 --- a/drivers/net/ethernet/sunplus/spl2sw_driver.c +++ b/drivers/net/ethernet/sunplus/spl2sw_driver.c @@ -62,7 +62,8 @@ static int spl2sw_ethernet_stop(struct net_device *ndev) return 0; } -static int spl2sw_ethernet_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t spl2sw_ethernet_start_xmit(struct sk_buff *skb, + struct net_device *ndev) { struct spl2sw_mac *mac = netdev_priv(ndev); struct spl2sw_common *comm = mac->comm; -- 2.35.1