public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
* [lee-leds:for-leds-next 3/10] drivers/leds/rgb/leds-lp5860-core.c:72:13: warning: variable 'ret' set but not used
@ 2026-01-09 18:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-09 18:58 UTC (permalink / raw)
  To: Steffen Trumtrar; +Cc: oe-kbuild-all, linux-leds, Lee Jones

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
head:   e257dc532c20bd93f0076c18cb5ffd739a5f0bb4
commit: 51f7560294c911e9394357a903ffa28eebe4b253 [3/10] leds: Add support for TI LP5860 LED driver chip
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260110/202601100247.wetiMFXE-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260110/202601100247.wetiMFXE-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/202601100247.wetiMFXE-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/leds/rgb/leds-lp5860-core.c: In function 'lp5860_led_init':
>> drivers/leds/rgb/leds-lp5860-core.c:72:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      72 |         int ret;
         |             ^~~


vim +/ret +72 drivers/leds/rgb/leds-lp5860-core.c

    66	
    67	static int lp5860_led_init(struct lp5860_led *led, struct fwnode_handle *fwnode,
    68				   unsigned int channel)
    69	{
    70		enum led_default_state default_state;
    71		unsigned int brightness;
  > 72		int ret;
    73	
    74		ret = regmap_read(led->chip->regmap, LP5860_REG_PWM_BRI_START + channel, &brightness);
    75	
    76		default_state = led_init_default_state_get(fwnode);
    77	
    78		switch (default_state) {
    79		case LEDS_DEFSTATE_ON:
    80			led->brightness = LP5860_MAX_BRIGHTNESS;
    81			break;
    82		case LEDS_DEFSTATE_KEEP:
    83			led->brightness = min(brightness, LP5860_MAX_BRIGHTNESS);
    84			break;
    85		default:
    86			led->brightness = 0;
    87			break;
    88		}
    89	
    90		return lp5860_set_mc_brightness(&led->mc_cdev.led_cdev, led->brightness);
    91	}
    92	

-- 
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-01-09 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 18:58 [lee-leds:for-leds-next 3/10] drivers/leds/rgb/leds-lp5860-core.c:72:13: warning: variable 'ret' 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