[lee-leds:for-leds-next 61/62] drivers/leds/leds-lp55xx-common.c:798:17: warning: unused variable 'ret'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
head:   b9bd590268485652b928110b5543057543b5d02b
commit: efd0d1cbb8c5dd1049922e839fa7d85811facd53 [61/62] leds: leds-lp55xx: Convert mutex lock/unlock to guard API
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20240709/202407092320.CLSkqq2U-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240709/202407092320.CLSkqq2U-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407092320.CLSkqq2U-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_led_brightness':
   drivers/leds/leds-lp55xx-common.c:276:33: error: macro "guard" passed 2 arguments, but takes just 1
     276 |         guard(mutex, &chip->lock);
         |                                 ^
   In file included from drivers/leds/leds-lp55xx-common.c:13:
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:276:9: error: 'guard' undeclared (first use in this function)
     276 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c:276:9: note: each undeclared identifier is reported only once for each function it appears in
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_multicolor_brightness':
   drivers/leds/leds-lp55xx-common.c:291:33: error: macro "guard" passed 2 arguments, but takes just 1
     291 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:291:9: error: 'guard' undeclared (first use in this function)
     291 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'led_current_store':
   drivers/leds/leds-lp55xx-common.c:409:33: error: macro "guard" passed 2 arguments, but takes just 1
     409 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:409:9: error: 'guard' undeclared (first use in this function)
     409 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'run_engine_store':
   drivers/leds/leds-lp55xx-common.c:637:33: error: macro "guard" passed 2 arguments, but takes just 1
     637 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:637:9: error: 'guard' undeclared (first use in this function)
     637 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_store_engine_mode':
   drivers/leds/leds-lp55xx-common.c:676:33: error: macro "guard" passed 2 arguments, but takes just 1
     676 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:676:9: error: 'guard' undeclared (first use in this function)
     676 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_store_engine_load':
   drivers/leds/leds-lp55xx-common.c:704:33: error: macro "guard" passed 2 arguments, but takes just 1
     704 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:704:9: error: 'guard' undeclared (first use in this function)
     704 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_store_engine_leds':
   drivers/leds/leds-lp55xx-common.c:803:33: error: macro "guard" passed 2 arguments, but takes just 1
     803 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:803:9: error: 'guard' undeclared (first use in this function)
     803 |         guard(mutex, &chip->lock);
         |         ^~~~~
>> drivers/leds/leds-lp55xx-common.c:798:17: warning: unused variable 'ret' [-Wunused-variable]
     798 |         ssize_t ret;
         |                 ^~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_show_master_fader':
   drivers/leds/leds-lp55xx-common.c:827:33: error: macro "guard" passed 2 arguments, but takes just 1
     827 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:827:9: error: 'guard' undeclared (first use in this function)
     827 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_store_master_fader':
   drivers/leds/leds-lp55xx-common.c:851:33: error: macro "guard" passed 2 arguments, but takes just 1
     851 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:851:9: error: 'guard' undeclared (first use in this function)
     851 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_show_master_fader_leds':
   drivers/leds/leds-lp55xx-common.c:870:33: error: macro "guard" passed 2 arguments, but takes just 1
     870 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:870:9: error: 'guard' undeclared (first use in this function)
     870 |         guard(mutex, &chip->lock);
         |         ^~~~~
   drivers/leds/leds-lp55xx-common.c: In function 'lp55xx_store_master_fader_leds':
   drivers/leds/leds-lp55xx-common.c:901:33: error: macro "guard" passed 2 arguments, but takes just 1
     901 |         guard(mutex, &chip->lock);
         |                                 ^
   include/linux/cleanup.h:163: note: macro "guard" defined here
     163 | #define guard(_name) \
         | 
   drivers/leds/leds-lp55xx-common.c:901:9: error: 'guard' undeclared (first use in this function)
     901 |         guard(mutex, &chip->lock);
         |         ^~~~~


vim +/ret +798 drivers/leds/leds-lp55xx-common.c

8913c2c1472885 Christian Marangi 2024-06-26  789  
8913c2c1472885 Christian Marangi 2024-06-26  790  ssize_t lp55xx_store_engine_leds(struct device *dev,
8913c2c1472885 Christian Marangi 2024-06-26  791  				 struct device_attribute *attr,
8913c2c1472885 Christian Marangi 2024-06-26  792  				 const char *buf, size_t len, int nr)
8913c2c1472885 Christian Marangi 2024-06-26  793  {
8913c2c1472885 Christian Marangi 2024-06-26  794  	struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev));
8913c2c1472885 Christian Marangi 2024-06-26  795  	struct lp55xx_chip *chip = led->chip;
8913c2c1472885 Christian Marangi 2024-06-26  796  	struct lp55xx_engine *engine = &chip->engines[nr - 1];
8913c2c1472885 Christian Marangi 2024-06-26  797  	u16 mux = 0;
8913c2c1472885 Christian Marangi 2024-06-26 @798  	ssize_t ret;
8913c2c1472885 Christian Marangi 2024-06-26  799  
8913c2c1472885 Christian Marangi 2024-06-26  800  	if (lp55xx_mux_parse(chip, buf, &mux, len))
8913c2c1472885 Christian Marangi 2024-06-26  801  		return -EINVAL;
8913c2c1472885 Christian Marangi 2024-06-26  802  
efd0d1cbb8c5dd Christian Marangi 2024-06-27  803  	guard(mutex, &chip->lock);
8913c2c1472885 Christian Marangi 2024-06-26  804  
8913c2c1472885 Christian Marangi 2024-06-26  805  	chip->engine_idx = nr;
8913c2c1472885 Christian Marangi 2024-06-26  806  
8913c2c1472885 Christian Marangi 2024-06-26  807  	if (engine->mode != LP55XX_ENGINE_LOAD)
efd0d1cbb8c5dd Christian Marangi 2024-06-27  808  		return -EINVAL;
8913c2c1472885 Christian Marangi 2024-06-26  809  
8913c2c1472885 Christian Marangi 2024-06-26  810  	if (lp55xx_load_mux(chip, mux, nr))
efd0d1cbb8c5dd Christian Marangi 2024-06-27  811  		return -EINVAL;
8913c2c1472885 Christian Marangi 2024-06-26  812  
efd0d1cbb8c5dd Christian Marangi 2024-06-27  813  	return len;
8913c2c1472885 Christian Marangi 2024-06-26  814  }
8913c2c1472885 Christian Marangi 2024-06-26  815  EXPORT_SYMBOL_GPL(lp55xx_store_engine_leds);
8913c2c1472885 Christian Marangi 2024-06-26  816  

:::::: The code at line 798 was first introduced by commit
:::::: 8913c2c14728851f110e0d439d5bb2360c767cd2 leds: leds-lp55xx: Generalize sysfs engine_leds

:::::: TO: Christian Marangi <ansuelsmth@xxxxxxxxx>
:::::: CC: Lee Jones <lee@xxxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux