[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2022 15:06:56 +0800
From: kernel test robot <lkp@...el.com>
To: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/net/wwan/iosm/iosm_ipc_mux_codec.c:1474:21: sparse: sparse:
Using plain integer as NULL pointer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4bbf3422df78029f03161640dcb1e9d1ed64d1ea
commit: 035e3befc191347331dd2530c3686e05a8acfbb2 net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled
date: 2 days ago
config: parisc-randconfig-s051-20221110
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=035e3befc191347331dd2530c3686e05a8acfbb2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 035e3befc191347331dd2530c3686e05a8acfbb2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wwan/iosm/iosm_ipc_mux_codec.c:1474:21: sparse: sparse: Using plain integer as NULL pointer
vim +1474 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
1f52d7b622854b M Chetan Kumar 2022-02-10 1449
9413491e20e1ab M Chetan Kumar 2021-06-13 1450 void ipc_mux_ul_encoded_process(struct iosm_mux *ipc_mux, struct sk_buff *skb)
9413491e20e1ab M Chetan Kumar 2021-06-13 1451 {
1f52d7b622854b M Chetan Kumar 2022-02-10 1452 union mux_type_header hr;
9413491e20e1ab M Chetan Kumar 2021-06-13 1453 u16 adgh_len;
1f52d7b622854b M Chetan Kumar 2022-02-10 1454 int payload;
9413491e20e1ab M Chetan Kumar 2021-06-13 1455
1f52d7b622854b M Chetan Kumar 2022-02-10 1456 if (ipc_mux->protocol == MUX_LITE) {
1f52d7b622854b M Chetan Kumar 2022-02-10 1457 hr.adgh = (struct mux_adgh *)skb->data;
1f52d7b622854b M Chetan Kumar 2022-02-10 1458 adgh_len = le16_to_cpu(hr.adgh->length);
1f52d7b622854b M Chetan Kumar 2022-02-10 1459 if (hr.adgh->signature == cpu_to_le32(IOSM_AGGR_MUX_SIG_ADGH) &&
9413491e20e1ab M Chetan Kumar 2021-06-13 1460 ipc_mux->ul_flow == MUX_UL)
1f52d7b622854b M Chetan Kumar 2022-02-10 1461 ipc_mux->ul_data_pend_bytes =
1f52d7b622854b M Chetan Kumar 2022-02-10 1462 ipc_mux->ul_data_pend_bytes - adgh_len;
1f52d7b622854b M Chetan Kumar 2022-02-10 1463 } else {
1f52d7b622854b M Chetan Kumar 2022-02-10 1464 hr.adbh = (struct mux_adbh *)(skb->data);
1f52d7b622854b M Chetan Kumar 2022-02-10 1465 payload = ipc_mux_get_payload_from_adb(ipc_mux, hr.adbh);
1f52d7b622854b M Chetan Kumar 2022-02-10 1466 ipc_mux->ul_data_pend_bytes -= payload;
1f52d7b622854b M Chetan Kumar 2022-02-10 1467 }
9413491e20e1ab M Chetan Kumar 2021-06-13 1468
9413491e20e1ab M Chetan Kumar 2021-06-13 1469 if (ipc_mux->ul_flow == MUX_UL)
9413491e20e1ab M Chetan Kumar 2021-06-13 1470 dev_dbg(ipc_mux->dev, "ul_data_pend_bytes: %lld",
9413491e20e1ab M Chetan Kumar 2021-06-13 1471 ipc_mux->ul_data_pend_bytes);
9413491e20e1ab M Chetan Kumar 2021-06-13 1472
9413491e20e1ab M Chetan Kumar 2021-06-13 1473 /* Reset the skb settings. */
9413491e20e1ab M Chetan Kumar 2021-06-13 @1474 skb->tail = 0;
9413491e20e1ab M Chetan Kumar 2021-06-13 1475 skb->len = 0;
9413491e20e1ab M Chetan Kumar 2021-06-13 1476
9413491e20e1ab M Chetan Kumar 2021-06-13 1477 /* Add the consumed ADB to the free list. */
9413491e20e1ab M Chetan Kumar 2021-06-13 1478 skb_queue_tail((&ipc_mux->ul_adb.free_list), skb);
9413491e20e1ab M Chetan Kumar 2021-06-13 1479 }
9413491e20e1ab M Chetan Kumar 2021-06-13 1480
:::::: The code at line 1474 was first introduced by commit
:::::: 9413491e20e1aba6e471d90c19cc43e523216a4d net: iosm: encode or decode datagram
:::::: TO: M Chetan Kumar <m.chetan.kumar@...el.com>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (122505 bytes)
Powered by blists - more mailing lists