Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3987102rwb; Sun, 9 Oct 2022 15:21:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7X+483rf872ii5CWarWBX1hztmIqhZHsccNijmZeR+eBsXM7NSuBC1mu3QaaISseioU+/x X-Received: by 2002:a05:6402:5106:b0:45c:2c80:94a4 with SMTP id m6-20020a056402510600b0045c2c8094a4mr563935edd.298.1665354090577; Sun, 09 Oct 2022 15:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665354090; cv=none; d=google.com; s=arc-20160816; b=RMI/JHVbPuLM0HMzTIql3mS4+usI2QB/+zrifMzDoaH16pdH3t0Wzr3Pn2qKW97SHy dlKjKx/SosnV2FqemUIMciU1l80/YvfbsPQTOxrRoIK0MwnBWOufkxmLAQp3IbZpRPMz kSrVXcK9shwZJRp7vBG5Z4/inyegLUp0tAplc/rCEybopB8ewr2kewF5bZfB7KvHtu+9 Gp/WcjYzH4/rQ6uLrtaiukM7iAjRKKTcm1xSBsWXaYMRnrdyD/+ciefrWyzUcyHjFhxj RlOtrAGLQBoCMiAeu8JG+ze64AIiLMq5lLmauwrJe3KUCTottpuLZ03dtAFF3CCPEat2 OPvg== 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=1EVbCuAPGQXg9bXRRD/l5x1H74OmyRd3I/zntLIL9LJz/kgkTMlDGoXSoRa0eoaRlb DcN5QHaxd/EPSAElOLdwEIeG51UEk5bocPIm79E5OEWzOHyfTEe7Ff2kYloh2k4JYD/K s5yUva7dcIIykggj0zBTWpwYwhiVSRRvEqGYOeC+pdTNyCyYkTEgDkqhYUT2T4nRvtk8 HAWcgdEwD0cRo2J6xien6DXDBAGsvXo4+6FAJeQboA3HrlYKYiejEoTNw5k1yg+SP6qS tSe13mpk5OCQUC7OsXJ/G6GpYZcsEqV8DXOTQYEU+MVzUUS2AWQ3zTdjV/e+zLaKOu7T PkEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eW7JKlrI; 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 d20-20020a05640208d400b00459fc3fcf0bsi8170175edz.101.2022.10.09.15.21.05; Sun, 09 Oct 2022 15:21:30 -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=eW7JKlrI; 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 S231409AbiJIWRM (ORCPT + 99 others); Sun, 9 Oct 2022 18:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbiJIWQc (ORCPT ); Sun, 9 Oct 2022 18:16:32 -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 459E331225; Sun, 9 Oct 2022 15:14:21 -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 DBE8260CA0; Sun, 9 Oct 2022 22:11:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B191C433B5; Sun, 9 Oct 2022 22:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353507; bh=cpkR3yihHCyaXTPeQQm/wMJ4ddFUjwbeXWAh0j03wr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eW7JKlrID9L/Bd6K64Y9q6qWgAXIyuZSgHE4oNaGYtTyGK4FGT4/OAAENLYWwVBhU E+T5u6k39acnR27AMjxygW64gAkR8YwbM38rqjqiaM7Gs6TbxUhXVvHYnQgPbnxRKD e7iCSauOGq8zxccU7zoRz/SmNTUvfeeZOuKnGeiFZdoQymWyoIIQnpVu/Xj3W1X2Pg RpoOP+RALoHBWikspyfRCN/vGfQisILTdqKlPjUuYqAQFbAoDebpS/BECuOW3vwtaT GRmoopP2umj+mIcips/t3uZlsRGNlCI3DAHSY7ooRs455TJl46w1xasI0+w6RSC80a 2HZvmqcXIM5Ag== 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 6.0 48/77] net: ethernet: litex: Fix return type of liteeth_start_xmit Date: Sun, 9 Oct 2022 18:07:25 -0400 Message-Id: <20221009220754.1214186-48-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009220754.1214186-1-sashal@kernel.org> References: <20221009220754.1214186-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