From: Greg Kroah-Hartman Date: Thu, 8 Sep 2022 11:39:59 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v5.19.9~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfb51b82a148d4dd38f0b8bf7024af25b5383c69;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: net-wwan-iosm-remove-pointless-null-check.patch --- diff --git a/queue-5.15/net-wwan-iosm-remove-pointless-null-check.patch b/queue-5.15/net-wwan-iosm-remove-pointless-null-check.patch new file mode 100644 index 00000000000..a2d61654848 --- /dev/null +++ b/queue-5.15/net-wwan-iosm-remove-pointless-null-check.patch @@ -0,0 +1,58 @@ +From dbbc7d04c549a43ad343c69e17b27a57e2102041 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Wed, 18 May 2022 17:43:42 -0700 +Subject: net: wwan: iosm: remove pointless null check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jakub Kicinski + +commit dbbc7d04c549a43ad343c69e17b27a57e2102041 upstream. + +GCC 12 warns: + +drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function ‘ipc_protocol_dl_td_process’: +drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: warning: the comparison will always evaluate as ‘true’ for the address of ‘cb’ 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_protocol, + struct ipc_pipe *pipe) + { +- u32 tail = +- le32_to_cpu(ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]); + struct ipc_protocol_td *p_td; + struct sk_buff *skb; + +@@ -401,14 +399,6 @@ struct sk_buff *ipc_protocol_dl_td_proce + ipc_pcie_kfree_skb(ipc_protocol->pcie, skb); + skb = 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 = NULL; +- goto ret; + } + + if (p_td->buffer.address != IPC_CB(skb)->mapping) { diff --git a/queue-5.15/series b/queue-5.15/series new file mode 100644 index 00000000000..1ab8cadc934 --- /dev/null +++ b/queue-5.15/series @@ -0,0 +1 @@ +net-wwan-iosm-remove-pointless-null-check.patch