lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202402061757.2OeFfaWP-lkp@intel.com>
Date: Tue, 6 Feb 2024 17:58:15 +0800
From: kernel test robot <lkp@...el.com>
To: Balsam CHIHI <bchihi@...libre.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: drivers/thermal/mediatek/lvts_thermal.c:520:2-3: Unneeded semicolon

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
commit: f5f633b18234cecb0e6ee6e5fbb358807dda15c3 thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver
date:   12 months ago
config: sparc64-randconfig-r064-20240206 (https://download.01.org/0day-ci/archive/20240206/202402061757.2OeFfaWP-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0

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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402061757.2OeFfaWP-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/thermal/mediatek/lvts_thermal.c:520:2-3: Unneeded semicolon

vim +520 drivers/thermal/mediatek/lvts_thermal.c

   464	
   465	static int lvts_sensor_init(struct device *dev, struct lvts_ctrl *lvts_ctrl,
   466						const struct lvts_ctrl_data *lvts_ctrl_data)
   467	{
   468		struct lvts_sensor *lvts_sensor = lvts_ctrl->sensors;
   469		void __iomem *msr_regs[] = {
   470			LVTS_MSR0(lvts_ctrl->base),
   471			LVTS_MSR1(lvts_ctrl->base),
   472			LVTS_MSR2(lvts_ctrl->base),
   473			LVTS_MSR3(lvts_ctrl->base)
   474		};
   475	
   476		void __iomem *imm_regs[] = {
   477			LVTS_IMMD0(lvts_ctrl->base),
   478			LVTS_IMMD1(lvts_ctrl->base),
   479			LVTS_IMMD2(lvts_ctrl->base),
   480			LVTS_IMMD3(lvts_ctrl->base)
   481		};
   482	
   483		int i;
   484	
   485		for (i = 0; i < lvts_ctrl_data->num_lvts_sensor; i++) {
   486	
   487			int dt_id = lvts_ctrl_data->lvts_sensor[i].dt_id;
   488	
   489			/*
   490			 * At this point, we don't know which id matches which
   491			 * sensor. Let's set arbitrally the id from the index.
   492			 */
   493			lvts_sensor[i].id = i;
   494	
   495			/*
   496			 * The thermal zone registration will set the trip
   497			 * point interrupt in the thermal controller
   498			 * register. But this one will be reset in the
   499			 * initialization after. So we need to post pone the
   500			 * thermal zone creation after the controller is
   501			 * setup. For this reason, we store the device tree
   502			 * node id from the data in the sensor structure
   503			 */
   504			lvts_sensor[i].dt_id = dt_id;
   505	
   506			/*
   507			 * We assign the base address of the thermal
   508			 * controller as a back pointer. So it will be
   509			 * accessible from the different thermal framework ops
   510			 * as we pass the lvts_sensor pointer as thermal zone
   511			 * private data.
   512			 */
   513			lvts_sensor[i].base = lvts_ctrl->base;
   514	
   515			/*
   516			 * Each sensor has its own register address to read from.
   517			 */
   518			lvts_sensor[i].msr = lvts_ctrl_data->mode == LVTS_MSR_IMMEDIATE_MODE ?
   519				imm_regs[i] : msr_regs[i];
 > 520		};
   521	
   522		lvts_ctrl->num_lvts_sensor = lvts_ctrl_data->num_lvts_sensor;
   523	
   524		return 0;
   525	}
   526	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ