Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4034053rwb; Sun, 9 Oct 2022 16:27:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5r6UrFFIdv8qigUO8V/uQ5fxUR7sZZBGplT/S3/m7dE/RkwmiwmOfbaAJID2PffhaR3mSL X-Received: by 2002:a17:907:3da2:b0:78d:51c4:5b80 with SMTP id he34-20020a1709073da200b0078d51c45b80mr11326273ejc.716.1665358021901; Sun, 09 Oct 2022 16:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665358021; cv=none; d=google.com; s=arc-20160816; b=cUZdNCX6dZ6aePW2DLE8BlDTUf0vw64WFZuBz811IZWKfaqA+zttsUIDKZ2JD3yzNZ 8dSas0bXR2ZmsyGuhFJ+GQ8CjVp3j142/sFd+9sr8Xm70sGQ6PrffmfDpUT5y9aeX90i PRBKDX7WJauW4MLB0uuqzofrD63GdOOIPyLJEjlsxHo1jdfsPa8EsqGOTT4gFeK+SHJ8 cJa4lV4/UyMsbw5/QW9sB435sBTHIuU/GxZ80zr+q3BE11boR35A0Zlv0GoEqiyhYMF5 eNjRhaxvlwJpjCigQRz9PIXI7ZNpClnAU8JGM+81p1j2ZUCH8+kT42/PZw3rJrzYJ1Pg H95A== 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=0xO/FUljfNsShPgAWniM7n2t4bHR/07Y93t0/kfrxTE=; b=YI73rquHARsR9+LTnmGLigXvvB9AgP8XG2kfczKdYBJCcUMyylsRFoK+qe7jSx1v9K zY85YE9JNfG2NE2J8K5WSsr1yYiDrtXrdyGIvUdUo8X0aWin+CmEd6Xy1hMRgC6kGYPp ynURgnQtcTqRelf+o7ZeVeji4lIrrCtFlWsxE9omrTFOirZBAkOBkUf2cOD2twuftsEb 7GVkg5vqIbz2XPem++MAPGU+t0p1QVvTKgW6Bjqqr/Zqu6f1AJq7vpO7tAAvq+gUsoQD dEl8T/6CsF+/isINNjmEDEteCF2VyYPbq57cwalfTJPK0sjRsTdz7CTAW6xEUTM09tmn Qpnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ClOMThfe; 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 ti5-20020a170907c20500b00782faf12c6esi8822378ejc.78.2022.10.09.16.26.36; Sun, 09 Oct 2022 16:27:01 -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=ClOMThfe; 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 S231610AbiJIWXf (ORCPT + 99 others); Sun, 9 Oct 2022 18:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231779AbiJIWW3 (ORCPT ); Sun, 9 Oct 2022 18:22:29 -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 B7ECB3DBCB; Sun, 9 Oct 2022 15:17:32 -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 4966AB80DDD; Sun, 9 Oct 2022 22:12:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 523B7C433C1; Sun, 9 Oct 2022 22:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353524; bh=3pBU1LDgBjC4lVgA5Q9o0xcuXk0CW2WCoFOa82FRnWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ClOMThfekhzYnzJxUXuF+xOCDGZ0DAhTT84SDppXwE7f2Z+NHX77tSmL3hEv1nnRL 3A0MS1pIpQOU393h0EhcRqw5tagKiH0OPAXYadmjfigfQGCT9Za64yQQ4LRwTY2Syv 1SNFBp5x9fS1ju7H9hsH+V78Aft/eDyWof+NbtfEtrp1G+8PhBppKH+sPReq9YOhmD dLWasSoe8plcm8rmlqK4l0DJnqq7tgvsVRtBOnFYO6DaGMiUpNDr6uQPV2AjGDaq7b Z8C3VA8D8aGcaduhEgbt60MsuQ54jMiEaPR7FDiDuaz7yx2a+DI4Sasr4BUIvHuz3S ajLie1X8K8leQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Sergey Ryazanov , Jakub Kicinski , Sasha Levin , m.chetan.kumar@intel.com, linuxwwan@intel.com, loic.poulain@linaro.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, nathan@kernel.org, ndesaulniers@google.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.0 50/77] net: wwan: iosm: Fix return type of ipc_wwan_link_transmit Date: Sun, 9 Oct 2022 18:07:27 -0400 Message-Id: <20221009220754.1214186-50-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 0c9441c430104dcf2cd066aae74dbeefb9f9e1bf ] 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 ipc_wwan_link_transmit 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 Acked-by: Sergey Ryazanov Link: https://lore.kernel.org/r/20220912214455.929028-1-nhuck@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/wwan/iosm/iosm_ipc_wwan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c index 27151148c782..03757ad21d51 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c +++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c @@ -103,8 +103,8 @@ static int ipc_wwan_link_stop(struct net_device *netdev) } /* Transmit a packet */ -static int ipc_wwan_link_transmit(struct sk_buff *skb, - struct net_device *netdev) +static netdev_tx_t ipc_wwan_link_transmit(struct sk_buff *skb, + struct net_device *netdev) { struct iosm_netdev_priv *priv = wwan_netdev_drvpriv(netdev); struct iosm_wwan *ipc_wwan = priv->ipc_wwan; -- 2.35.1