Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4049876rwb; Sun, 9 Oct 2022 16:50:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7mJ4Y6bAFmsTf0jCl2lLtH5bVKsHmGGzPx29K+6YscZk0RS5whQcsN9kory/asXfxU7+vC X-Received: by 2002:a05:6402:35ca:b0:459:f9c3:cfe7 with SMTP id z10-20020a05640235ca00b00459f9c3cfe7mr14735082edc.275.1665359450081; Sun, 09 Oct 2022 16:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665359450; cv=none; d=google.com; s=arc-20160816; b=0Msf3crqOSeIHOzQrYOiz4Kb8jufPo7YstFMWDOpAND+AEzSxNtVe/N0ATiSV5c+VT gEDYZGVdWauWchoVrUKVIjR3btZd5Fx2bnYePb68QitUiR1geV9Cy3VdQ2UsbycDsoGW YyX84/M5sJnzvkCIVwzA7NOIlNYHo9j9cBpE2SqDDbBdHwdaRd5gYODoQkKQJ7LMTMU7 vDMCzqaleRLiJfbYwHvXueH0QvUMO1GqMuglzd/WTslcRRa3DgUSsKF/7zfqY3sLFf0R N7UuYveaVToNH+NC9hIPIiIFPchFUEewIveVwurjBKd/UzyHJzNLe/252waVyTZlSaTL /63w== 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=a3qu3tcZ98HRAFbZ4PHjhJKaP/rUuav3kJFeuxfYCp4=; b=QT13oKqcNIodQZE+1sxZFcKxTEEjagLYPlVi35A4tpryF+xukxUwd0hmwG55kYacgS vtPEoV5CSEyeQrqfHuv+eA4ga+glktwyO8B9SggFIcsfdLQoklNyFYVY4V7z9W/sSKfp t123LCffZF4NMxbtKs20RXdw19cY5x0QdnKzFTOEANJiNozpDvBaiEZsslnJl78/VxCm 4NL3vzUOTZImcZfkuyQsmW9TAU0nIXYp9ZIfGTiezCIEze9j1+zP0zsAsC2aSqpCCOgW VBg9EKDrqAwgkhH+HqMPq++oeKPQmFeecbFOVjX/cDjkj3c9ITNITzubK9tzz3xmEuik jMIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="l+F/yduy"; 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 v4-20020a170906338400b0078d40f7ef1fsi8915192eja.330.2022.10.09.16.50.23; Sun, 09 Oct 2022 16:50:50 -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="l+F/yduy"; 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 S232195AbiJIW2Z (ORCPT + 99 others); Sun, 9 Oct 2022 18:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231934AbiJIW0C (ORCPT ); Sun, 9 Oct 2022 18:26:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F45027CFB; Sun, 9 Oct 2022 15:18:38 -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 8E43360C99; Sun, 9 Oct 2022 22:17:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F7ABC4347C; Sun, 9 Oct 2022 22:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353866; bh=cpkR3yihHCyaXTPeQQm/wMJ4ddFUjwbeXWAh0j03wr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+F/yduyDhaF4dE2ppZKC0z3zajKD4Mlk++x4H/mxS9WFAU4wz4TboNBpIxkaD/wx L5e11zv1RiaBCE+jDnQkdqLC9lkYyEaWh2tcnLCku8Osk90oMYMA7RdwYRLYquYZbQ /UyKg2FdMUnYjNrlKBHON7X2aGtaKMIiV1HxHNsq3ub4+k3aDSCAoLfw1I7D4ogMsn XgCbGxHpiREwS3TUcL6F0cBx6fWS5wt1Jtj/rchQ0vJ/5/wxHWM81Bjsk2JtdRhS7N bKtjoXsaC39mR2+ugl1NN7kF4sF7n4FCpA/zBGjpx6bj3NI9RdYl+J1K88Vx/8Jr8u VeoPXbvFfxRHA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Nathan Chancellor , Gabriel Somlo , Jakub Kicinski , Sasha Levin , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, kgugala@antmicro.com, mholenko@antmicro.com, joel@jms.id.au, ndesaulniers@google.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 45/73] net: ethernet: litex: Fix return type of liteeth_start_xmit Date: Sun, 9 Oct 2022 18:14:23 -0400 Message-Id: <20221009221453.1216158-45-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: Nathan Huckleberry [ Upstream commit 40662333dd7c64664247a6138bc33f3974e3a331 ] 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 liteeth_start_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 Acked-by: Gabriel Somlo Link: https://lore.kernel.org/r/20220912195307.812229-1-nhuck@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/litex/litex_liteeth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c index fdd99f0de424..35f24e0f0934 100644 --- a/drivers/net/ethernet/litex/litex_liteeth.c +++ b/drivers/net/ethernet/litex/litex_liteeth.c @@ -152,7 +152,8 @@ static int liteeth_stop(struct net_device *netdev) return 0; } -static int liteeth_start_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t liteeth_start_xmit(struct sk_buff *skb, + struct net_device *netdev) { struct liteeth *priv = netdev_priv(netdev); void __iomem *txbuffer; -- 2.35.1