* drivers/soc/mediatek/mtk-dvfsrc.c:524:2-3: Unneeded semicolon
@ 2026-11-17 15:05 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-17 15:05 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: oe-kbuild-all, linux-kernel, Nicolas Frattaroli
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
commit: 75cf308fee7e4b3038741f96fd90afc3bd871e64 soc: mediatek: mtk-dvfsrc: Add support for DVFSRCv4 and MT8196
date: 10 months ago
config: arm64-randconfig-r2109-20261116 (https://download.01.org/0day-ci/archive/20261117/20261117160346.MCgJLmbK-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5637411ce5dc86d0b7f87cde0f7ee47406d29db6)
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: 75cf308fee7e ("soc: mediatek: mtk-dvfsrc: Add support for DVFSRCv4 and MT8196")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261117160346.MCgJLmbK-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/soc/mediatek/mtk-dvfsrc.c:524:2-3: Unneeded semicolon
vim +524 drivers/soc/mediatek/mtk-dvfsrc.c
475
476 static int dvfsrc_get_hw_opps_v4(struct mtk_dvfsrc *dvfsrc)
477 {
478 struct dvfsrc_opp *dvfsrc_opps;
479 struct dvfsrc_opp_desc *desc;
480 u32 num_opps, gear_info;
481 u8 num_vcore, num_dram;
482 u8 num_emi;
483 int i;
484
485 num_opps = dvfsrc_get_opp_count_v4(dvfsrc);
486 if (num_opps == 0) {
487 dev_err(dvfsrc->dev, "No OPPs programmed in DVFSRC MCU.\n");
488 return -EINVAL;
489 }
490
491 /*
492 * The first 16 bits set in the gear info table says how many OPPs
493 * and how many vcore, dram and emi table entries are available.
494 */
495 gear_info = dvfsrc_readl(dvfsrc, DVFSRC_GEAR_INFO_L);
496 if (gear_info == 0) {
497 dev_err(dvfsrc->dev, "No gear info in DVFSRC MCU.\n");
498 return -EINVAL;
499 }
500
501 num_vcore = FIELD_GET(DVFSRC_V4_GEAR_INFO_VCORE, gear_info) + 1;
502 num_dram = FIELD_GET(DVFSRC_V4_GEAR_INFO_DRAM, gear_info) + 1;
503 num_emi = FIELD_GET(DVFSRC_V4_GEAR_INFO_EMI, gear_info) + 1;
504 dev_info(dvfsrc->dev,
505 "Discovered %u gears and %u vcore, %u dram, %u emi table entries.\n",
506 num_opps, num_vcore, num_dram, num_emi);
507
508 /* Allocate everything now as anything else after that cannot fail */
509 desc = devm_kzalloc(dvfsrc->dev, sizeof(*desc), GFP_KERNEL);
510 if (!desc)
511 return -ENOMEM;
512
513 dvfsrc_opps = devm_kcalloc(dvfsrc->dev, num_opps + 1,
514 sizeof(*dvfsrc_opps), GFP_KERNEL);
515 if (!dvfsrc_opps)
516 return -ENOMEM;
517
518 /* Read the OPP table gear indices */
519 for (i = 0; i <= num_opps; i++) {
520 gear_info = dvfsrc_get_opp_gear(dvfsrc, num_opps - i);
521 dvfsrc_opps[i].vcore_opp = FIELD_GET(DVFSRC_V4_GEAR_INFO_VCORE, gear_info);
522 dvfsrc_opps[i].dram_opp = FIELD_GET(DVFSRC_V4_GEAR_INFO_DRAM, gear_info);
523 dvfsrc_opps[i].emi_opp = FIELD_GET(DVFSRC_V4_GEAR_INFO_EMI, gear_info);
> 524 };
525 desc->num_opp = num_opps + 1;
526 desc->opps = dvfsrc_opps;
527
528 /* Assign to main structure now that everything is done! */
529 dvfsrc->curr_opps = desc;
530
531 return 0;
532 }
533
--
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 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 15:05 drivers/soc/mediatek/mtk-dvfsrc.c:524:2-3: Unneeded semicolon 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®