Re: [PATCH v2 4/9] bus: mhi: Centralize firmware image table selection at probe time

From: kernel test robot

Date: Sun Mar 08 2026 - 04:57:10 EST


Hi Kishore,

kernel test robot noticed the following build warnings:

[auto build test WARNING on a0ae2a256046c0c5d3778d1a194ff2e171f16e5f]

url: https://github.com/intel-lab-lkp/linux/commits/Kishore-Batta/Add-documentation-for-Sahara-protocol/20260307-194417
base: a0ae2a256046c0c5d3778d1a194ff2e171f16e5f
patch link: https://lore.kernel.org/r/20260307-sahara_protocol_new_v2-v2-4-29dc748b5e9c%40oss.qualcomm.com
patch subject: [PATCH v2 4/9] bus: mhi: Centralize firmware image table selection at probe time
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260308/202603081641.KSZC3Jla-lkp@xxxxxxxxx/config)
compiler: arc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260308/202603081641.KSZC3Jla-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603081641.KSZC3Jla-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/bus/mhi/sahara/sahara.c: In function 'sahara_select_variant':
>> drivers/bus/mhi/sahara/sahara.c:270:32: warning: the comparison will always evaluate as 'true' for the address of 'chan' will never be NULL [-Waddress]
270 | if (id && id->chan && !strcmp(id->chan, v->match))
| ^~
In file included from drivers/bus/mhi/sahara/sahara.c:12:
include/linux/mod_devicetable.h:867:20: note: 'chan' declared here
867 | const char chan[MHI_NAME_SIZE];
| ^~~~


vim +270 drivers/bus/mhi/sahara/sahara.c

260
261 static const struct sahara_variant *sahara_select_variant(struct mhi_device *mhi_dev,
262 const struct mhi_device_id *id)
263 {
264 int i;
265
266 for (i = 0; i < ARRAY_SIZE(sahara_variants); i++) {
267 const struct sahara_variant *v = &sahara_variants[i];
268
269 if (v->match_is_chan) {
> 270 if (id && id->chan && !strcmp(id->chan, v->match))
271 return v;
272 } else {
273 if (mhi_dev->mhi_cntrl && mhi_dev->mhi_cntrl->name &&
274 !strcmp(mhi_dev->mhi_cntrl->name, v->match))
275 return v;
276 }
277 }
278 return NULL;
279 }
280

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki