From nobody Sun Sep 14 22:52:49 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F693C6FA89 for ; Tue, 13 Sep 2022 14:52:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234481AbiIMOwE (ORCPT ); Tue, 13 Sep 2022 10:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234566AbiIMOtA (ORCPT ); Tue, 13 Sep 2022 10:49:00 -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 311B76FA25; Tue, 13 Sep 2022 07:25: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 9839BB80F92; Tue, 13 Sep 2022 14:16:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BF0CC433D6; Tue, 13 Sep 2022 14:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663078595; bh=Myr/K1diHuAlbtpy15kf7/p4zZiJit0fn5QkUHtEsmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aOJw9OSM9buA7Gs7jFiQFFxcK+13QnZX8eYsnFjq12HmeANANwp1oo7MI3ekbvZhb X4jfb3G4Z3ggWwypfgVX33lk/Xbf5xJoQ0n1AfQlV5MmdNWieDxtdf2Xfv9VyrR1ML s+41T00RxoHcAnRxRg/6nUIfxpk4S1GjO510RnN8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, M Chetan Kumar , Jakub Kicinski , Sudip Mukherjee Subject: [PATCH 5.15 001/121] net: wwan: iosm: remove pointless null check Date: Tue, 13 Sep 2022 16:03:12 +0200 Message-Id: <20220913140357.388181954@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140357.323297659@linuxfoundation.org> References: <20220913140357.323297659@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski commit dbbc7d04c549a43ad343c69e17b27a57e2102041 upstream. GCC 12 warns: drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function =E2=80=98ipc_pro= tocol_dl_td_process=E2=80=99: drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: warning: the comparis= on will always evaluate as =E2=80=98true=E2=80=99 for the address of =E2=80= =98cb=E2=80=99 will never be NULL [-Waddress] 406 | if (!IPC_CB(skb)) { | ^ Indeed the check seems entirely pointless. Hopefully the other validation checks will catch if the cb is bad, but it can't be NULL. Reviewed-by: M Chetan Kumar Link: https://lore.kernel.org/r/20220519004342.2109832-1-kuba@kernel.org Signed-off-by: Jakub Kicinski Cc: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c +++ b/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c @@ -372,8 +372,6 @@ bool ipc_protocol_dl_td_prepare(struct i struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_proto= col, struct ipc_pipe *pipe) { - u32 tail =3D - le32_to_cpu(ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]); struct ipc_protocol_td *p_td; struct sk_buff *skb; =20 @@ -401,14 +399,6 @@ struct sk_buff *ipc_protocol_dl_td_proce ipc_pcie_kfree_skb(ipc_protocol->pcie, skb); skb =3D NULL; goto ret; - } - - if (!IPC_CB(skb)) { - dev_err(ipc_protocol->dev, "pipe# %d, tail: %d skb_cb is NULL", - pipe->pipe_nr, tail); - ipc_pcie_kfree_skb(ipc_protocol->pcie, skb); - skb =3D NULL; - goto ret; } =20 if (p_td->buffer.address !=3D IPC_CB(skb)->mapping) {