Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4048798rwb; Sun, 9 Oct 2022 16:49:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UhBLWJiPfr6Wd1j5xjGfLp55RwWD2bdgi2jCio6pPtgzN7ZKpheqGUl9D6xGiuHX1jtos X-Received: by 2002:a17:906:8a47:b0:78d:b6d8:f531 with SMTP id gx7-20020a1709068a4700b0078db6d8f531mr2047944ejc.287.1665359354832; Sun, 09 Oct 2022 16:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665359354; cv=none; d=google.com; s=arc-20160816; b=JLAUE+v7xXpXLYkefR/I30qqLCsLwCz8mYmfOXyKP1v7Ob9rzs5SZNp5YgIiJl5y66 VEU8AtJGGZvhaQ4i/Si2F4kDmGp9xmLAXNfty+hxjIc5Bcmo/9qpwf0JENbRv+24NhT3 QZku+/ry/FAgMaei0XDvum4MoLpuXFIFyx4dXtrEI3downkGsmXxcUK1qeTWZseisI7y bgYXAzzYzvDsajulahz0ZE1IG3RGjMTORwZAdGjiVxBzwrJ7fCeqUhmpAVPNhjiPpR3E BlNUBKSi2b4atO18rX20Sj0f+1AlTrooQTk6Xk7Qj4Xu6LijFoqc2YazFPKL8VfpE0xq mrCQ== 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=s9E5oRCYhTjrI6PqXcoxYqyD7mUAW6g56Zn2NMUEY6o=; b=WJEC1LXoF+1rcAQna4BCIdo1hflMUIGhbJIvSr1tXkBSL3ooeLyYYZKIfO1tU+XZS9 Ir6YY/hNlFb0mgg2Jh8qflwyk1EsOyt0eNt9ch15a0n42fztaYUYvljf+o9VZ8ygsK6V 1OFEWlI8ly4if7txMFXzYde5Regimf0MGwCnNbF34U+WCxMWePNj4+XKhZn0Jg6N5oJc 7U1FebcZmPgpvIhGaknMw6LiYin3Q+2MqsI680RK61D7fb4ApqjrVr5b72/vfJdB5CM3 il9fygpXjN42dTAlBbzlw1GiPJ1covNinkijpOXVzeC313oys5DaE4VHXGUPMIaXF4m+ KiFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tci8Y7BB; 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 hu8-20020a170907a08800b00741a16e8562si2081719ejc.826.2022.10.09.16.48.49; Sun, 09 Oct 2022 16:49:14 -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=Tci8Y7BB; 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 S231718AbiJIWY1 (ORCPT + 99 others); Sun, 9 Oct 2022 18:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231559AbiJIWXM (ORCPT ); Sun, 9 Oct 2022 18:23:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF00E37188; Sun, 9 Oct 2022 15:17:49 -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 60B40B80DD1; Sun, 9 Oct 2022 22:11:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EC32C433D7; Sun, 9 Oct 2022 22:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353487; bh=4F5xLHe7kfVJXUiQ/RthEjjNUE1FM04erdeaO+pyyjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tci8Y7BBVLf82VTGMUYCraBNhyOJgJiWqizRYlZXpGOtZ7K9q0T/OLGs/ZXCWA+Vb YQHRQtHxr/3Nmzg4eUVDPWmEkJyYF0rW8vgU8fQpqNmaBXVQ81Ga9LBjPk06QVkVd0 FPTM2JBVdRGYu4U9NYcba4qT8mRhT2cI2NOMKtwDZEnZ0I+KBQGhaZdpa7gKYX34D0 S9fT7+UXlktbKrreGSlP+g3vVV+eX7tJDTdRxj4/crULxGxf+WQRY24py4Gv2bbWKd LcEASbxxnZbuf9tSbHVqTVnQPdL524VWEUcIcXb8YOSt8/mH4SJD2WXxJ67puzjuK5 jV5u3rdbx+ydA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Nathan Chancellor , Jakub Kicinski , Sasha Levin , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, ndesaulniers@google.com, petrm@nvidia.com, thomas.lendacky@amd.com, geoff@infradead.org, mw@semihalf.com, wsa+renesas@sang-engineering.com, dmitry.torokhov@gmail.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.0 46/77] net: davicom: Fix return type of dm9000_start_xmit Date: Sun, 9 Oct 2022 18:07:23 -0400 Message-Id: <20221009220754.1214186-46-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 0191580b000d50089a0b351f7cdbec4866e3d0d2 ] 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 dm9000_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 Link: https://lore.kernel.org/r/20220912194722.809525-1-nhuck@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/davicom/dm9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index 0985ab216566..186a5e0a7862 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c @@ -1012,7 +1012,7 @@ static void dm9000_send_packet(struct net_device *dev, * Hardware start transmission. * Send a packet to media from the upper layer. */ -static int +static netdev_tx_t dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned long flags; -- 2.35.1