[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB50087702603728A3BB01D33AD7D09@SJ0PR11MB5008.namprd11.prod.outlook.com>
Date: Thu, 19 May 2022 07:12:47 +0000
From: "Kumar, M Chetan" <m.chetan.kumar@...el.com>
To: Jakub Kicinski <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
linuxwwan <linuxwwan@...el.com>,
"loic.poulain@...aro.org" <loic.poulain@...aro.org>,
"ryazanov.s.a@...il.com" <ryazanov.s.a@...il.com>,
"johannes@...solutions.net" <johannes@...solutions.net>
Subject: RE: [PATCH net-next] net: wwan: iosm: remove pointless null check
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, May 19, 2022 6:14 AM
> To: davem@...emloft.net
> Cc: netdev@...r.kernel.org; edumazet@...gle.com; pabeni@...hat.com;
> Jakub Kicinski <kuba@...nel.org>; Kumar, M Chetan
> <m.chetan.kumar@...el.com>; linuxwwan <linuxwwan@...el.com>;
> loic.poulain@...aro.org; ryazanov.s.a@...il.com;
> johannes@...solutions.net
> Subject: [PATCH net-next] net: wwan: iosm: remove pointless null check
>
> 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 <m.chetan.kumar@...el.com>
Powered by blists - more mailing lists