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

From: kernel test robot

Date: Sun Mar 08 2026 - 05:28:19 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: i386-buildonly-randconfig-003-20260308 (https://download.01.org/0day-ci/archive/20260308/202603081717.xp3UQU2K-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260308/202603081717.xp3UQU2K-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/202603081717.xp3UQU2K-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/bus/mhi/sahara/sahara.c:270:18: warning: address of array 'id->chan' will always evaluate to 'true' [-Wpointer-bool-conversion]
270 | if (id && id->chan && !strcmp(id->chan, v->match))
| ~~ ~~~~^~~~
1 warning generated.


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