mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/ufs/host/ufs-mediatek.c:1351:32-33: WARNING: Use ARRAY_SIZE
@ 2026-11-17  2:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-17  2:24 UTC (permalink / raw)
  To: Peter Wang
  Cc: oe-kbuild-all, linux-kernel, Martin K. Petersen, Bart Van Assche

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   141b164bbe186423e295b139e40e8e2d11cf1341
commit: 1fd05367d5b1a5edd3d14c966a5f510e5b8a0c5e scsi: ufs: host: mediatek: Adjust sync length for FASTAUTO mode
date:   1 year, 1 month ago
config: arm64-randconfig-r2107-20261115 (https://download.01.org/0day-ci/archive/20261117/202611170300.dsQhfOB9-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project c0693becb96c1610aeb87445a50df00d58a823cd)

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
| Fixes: 1fd05367d5b1 ("scsi: ufs: host: mediatek: Adjust sync length for FASTAUTO mode")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611170300.dsQhfOB9-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/ufs/host/ufs-mediatek.c:1351:32-33: WARNING: Use ARRAY_SIZE

vim +1351 drivers/ufs/host/ufs-mediatek.c

  1334	
  1335	static void ufs_mtk_adjust_sync_length(struct ufs_hba *hba)
  1336	{
  1337		int i;
  1338		u32 value;
  1339		u32 cnt, att, min;
  1340		struct attr_min {
  1341			u32 attr;
  1342			u32 min_value;
  1343		} pa_min_sync_length[] = {
  1344			{PA_TXHSG1SYNCLENGTH, 0x48},
  1345			{PA_TXHSG2SYNCLENGTH, 0x48},
  1346			{PA_TXHSG3SYNCLENGTH, 0x48},
  1347			{PA_TXHSG4SYNCLENGTH, 0x48},
  1348			{PA_TXHSG5SYNCLENGTH, 0x48}
  1349		};
  1350	
> 1351		cnt = sizeof(pa_min_sync_length) / sizeof(struct attr_min);
  1352		for (i = 0; i < cnt; i++) {
  1353			att = pa_min_sync_length[i].attr;
  1354			min = pa_min_sync_length[i].min_value;
  1355			ufshcd_dme_get(hba, UIC_ARG_MIB(att), &value);
  1356			if (value < min)
  1357				ufshcd_dme_set(hba, UIC_ARG_MIB(att), min);
  1358	
  1359			ufshcd_dme_peer_get(hba, UIC_ARG_MIB(att), &value);
  1360			if (value < min)
  1361				ufshcd_dme_peer_set(hba, UIC_ARG_MIB(att), min);
  1362		}
  1363	}
  1364	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-17  2:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  2:24 drivers/ufs/host/ufs-mediatek.c:1351:32-33: WARNING: Use ARRAY_SIZE kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®