public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-leds@vger.kernel.org,
	Lee Jones <lee@kernel.org>
Subject: [lee-leds:for-leds-next 3/10] drivers/leds/rgb/leds-lp5860-core.c:72:13: warning: variable 'ret' set but not used
Date: Sat, 10 Jan 2026 02:58:06 +0800	[thread overview]
Message-ID: <202601100247.wetiMFXE-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-01-09 18:58 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=202601100247.wetiMFXE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=s.trumtrar@pengutronix.de \
    /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