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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202410201612.QJbPOweL-lkp@intel.com>
Date: Sun, 20 Oct 2024 18:44:01 +0800
From: kernel test robot <lkp@...el.com>
To: George Stark <gnstark@...utedevices.com>,
	u.kleine-koenig@...gutronix.de, neil.armstrong@...aro.org,
	khilman@...libre.com, jbrunet@...libre.com,
	martin.blumenstingl@...glemail.com
Cc: oe-kbuild-all@...ts.linux.dev, linux-pwm@...r.kernel.org,
	linux-amlogic@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	kernel@...utedevices.com, George Stark <gnstark@...utedevices.com>
Subject: Re: [PATCH v2 1/4] pwm: meson: Simplify get_state() callback

Hi George,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.12-rc3 next-20241018]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/George-Stark/pwm-meson-Simplify-get_state-callback/20241016-232751
base:   linus/master
patch link:    https://lore.kernel.org/r/20241016152553.2321992-2-gnstark%40salutedevices.com
patch subject: [PATCH v2 1/4] pwm: meson: Simplify get_state() callback
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241020/202410201612.QJbPOweL-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241020/202410201612.QJbPOweL-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410201612.QJbPOweL-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pwm/pwm-meson.c: In function 'meson_pwm_get_state':
>> drivers/pwm/pwm-meson.c:312:35: warning: variable 'channel' set but not used [-Wunused-but-set-variable]
     312 |         struct meson_pwm_channel *channel;
         |                                   ^~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [m]:
   - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +/channel +312 drivers/pwm/pwm-meson.c

c375bcbaabdb92 Martin Blumenstingl 2019-06-12  306  
6c452cff79f8bf Uwe Kleine-König    2022-12-02  307  static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
211ed630753d2f Neil Armstrong      2016-08-22  308  			       struct pwm_state *state)
211ed630753d2f Neil Armstrong      2016-08-22  309  {
211ed630753d2f Neil Armstrong      2016-08-22  310  	struct meson_pwm *meson = to_meson_pwm(chip);
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  311  	struct meson_pwm_channel_data *channel_data;
c375bcbaabdb92 Martin Blumenstingl 2019-06-12 @312  	struct meson_pwm_channel *channel;
2acdf419b01bae George Stark        2024-10-16  313  	unsigned int hi, lo;
329db102a26da0 Heiner Kallweit     2023-05-24  314  	u32 value;
211ed630753d2f Neil Armstrong      2016-08-22  315  
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  316  	channel = &meson->channels[pwm->hwpwm];
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  317  	channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];
211ed630753d2f Neil Armstrong      2016-08-22  318  
211ed630753d2f Neil Armstrong      2016-08-22  319  	value = readl(meson->base + REG_MISC_AB);
329db102a26da0 Heiner Kallweit     2023-05-24  320  	state->enabled = value & channel_data->pwm_en_mask;
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  321  
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  322  	value = readl(meson->base + channel_data->reg_offset);
2acdf419b01bae George Stark        2024-10-16  323  	lo = FIELD_GET(PWM_LOW_MASK, value);
2acdf419b01bae George Stark        2024-10-16  324  	hi = FIELD_GET(PWM_HIGH_MASK, value);
c375bcbaabdb92 Martin Blumenstingl 2019-06-12  325  
2acdf419b01bae George Stark        2024-10-16  326  	state->period = meson_pwm_cnt_to_ns(chip, pwm, lo + hi);
2acdf419b01bae George Stark        2024-10-16  327  	state->duty_cycle = meson_pwm_cnt_to_ns(chip, pwm, hi);
6c452cff79f8bf Uwe Kleine-König    2022-12-02  328  
8caa81eb950cb2 Uwe Kleine-König    2023-03-22  329  	state->polarity = PWM_POLARITY_NORMAL;
8caa81eb950cb2 Uwe Kleine-König    2023-03-22  330  
6c452cff79f8bf Uwe Kleine-König    2022-12-02  331  	return 0;
211ed630753d2f Neil Armstrong      2016-08-22  332  }
211ed630753d2f Neil Armstrong      2016-08-22  333  

-- 
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