mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Subject: drivers/soc/mediatek/mtk-dvfsrc.c:524:2-3: Unneeded semicolon
Date: Tue, 17 Nov 2026 16:05:45 +0100	[thread overview]
Message-ID: <20261117160346.MCgJLmbK-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-11-17 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117160346.MCgJLmbK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®