oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [xilinx-xlnx:xlnx_rebase_v6.6_LTS 984/991] drivers/misc/rsmu_cm.c:172:13: warning: variable 'err' set but not used
@ 2024-04-27 19:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-27 19:06 UTC (permalink / raw
  To: Min Li; +Cc: oe-kbuild-all, git, Michal Simek

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.6_LTS
head:   08ceadacc1da15a77045dee6654f9cd906906271
commit: 7d3c0f27dc86aab8e1ddd1683691633e72f28174 [984/991] misc: rsmu: add rsmu cdev driver
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20240428/202404280342.v6e0AsT4-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404280342.v6e0AsT4-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404280342.v6e0AsT4-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/misc/rsmu_cm.c: In function 'rsmu_cm_set_output_tdc_go':
>> drivers/misc/rsmu_cm.c:172:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
     172 |         int err;
         |             ^~~


vim +/err +172 drivers/misc/rsmu_cm.c

   165	
   166	static int rsmu_cm_set_output_tdc_go(struct rsmu_cdev *rsmu, u8 tdc, u8 enable)
   167	{
   168		/* This function enables or disables output tdc alignment. */
   169		u8 tdc_ctrl4_offset;
   170		u32 tdc_n;
   171		u8 reg;
 > 172		int err;
   173	
   174		tdc_ctrl4_offset = IDTCM_FW_REG(rsmu->fw_version, V520, OUTPUT_TDC_CTRL_4);
   175	
   176		switch (tdc) {
   177		case 0:
   178			tdc_n = OUTPUT_TDC_0;
   179			break;
   180		case 1:
   181			tdc_n = OUTPUT_TDC_1;
   182			break;
   183		case 2:
   184			tdc_n = OUTPUT_TDC_2;
   185			break;
   186		case 3:
   187			tdc_n = OUTPUT_TDC_3;
   188			break;
   189		default:
   190			return -EINVAL;
   191		}
   192	
   193		err = regmap_bulk_read(rsmu->regmap, tdc_n + tdc_ctrl4_offset,
   194				       &reg, sizeof(reg));
   195	
   196		if (enable)
   197			reg |= 0x01;
   198		else
   199			reg &= ~0x01;
   200	
   201		return regmap_bulk_write(rsmu->regmap, tdc_n + tdc_ctrl4_offset,
   202					 &reg, sizeof(reg));
   203	}
   204	

-- 
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:[~2024-04-27 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-27 19:06 [xilinx-xlnx:xlnx_rebase_v6.6_LTS 984/991] drivers/misc/rsmu_cm.c:172:13: warning: variable 'err' set but not used 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).