* [linux-next:master 9208/10236] drivers/leds/leds-gpio-register.c:23:25: warning: attribute declaration must precede definition
@ 2024-02-26 22:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-26 22:58 UTC (permalink / raw)
To: Duje Mihanović
Cc: llvm, oe-kbuild-all, Linux Memory Management List, Lee Jones,
Daniel Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8552c902efe7ef670b6961fb8885b67961aeb629
commit: 7a28f9cf6b7c8cad760b4d4ee7f53231cd76d8e4 [9208/10236] Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"
config: mips-bcm47xx_defconfig (https://download.01.org/0day-ci/archive/20240227/202402270609.79kfRDFE-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240227/202402270609.79kfRDFE-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/202402270609.79kfRDFE-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/leds/leds-gpio-register.c:23:25: warning: attribute declaration must precede definition [-Wignored-attributes]
struct platform_device *__init gpio_led_register_device(
^
include/linux/init.h:52:17: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline
^
include/linux/compiler_attributes.h:334:56: note: expanded from macro '__section'
#define __section(section) __attribute__((__section__(section)))
^
include/linux/leds.h:646:39: note: previous definition is here
static inline struct platform_device *gpio_led_register_device(
^
>> drivers/leds/leds-gpio-register.c:23:25: warning: attribute declaration must precede definition [-Wignored-attributes]
struct platform_device *__init gpio_led_register_device(
^
include/linux/init.h:52:41: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline
^
include/linux/compiler_types.h:113:34: note: expanded from macro '__cold'
#define __cold __attribute__((__cold__))
^
include/linux/leds.h:646:39: note: previous definition is here
static inline struct platform_device *gpio_led_register_device(
^
drivers/leds/leds-gpio-register.c:23:32: error: redefinition of 'gpio_led_register_device'
struct platform_device *__init gpio_led_register_device(
^
include/linux/leds.h:646:39: note: previous definition is here
static inline struct platform_device *gpio_led_register_device(
^
2 warnings and 1 error generated.
vim +23 drivers/leds/leds-gpio-register.c
4440673a95e63a Uwe Kleine-König 2011-05-24 10
4440673a95e63a Uwe Kleine-König 2011-05-24 11 /**
4440673a95e63a Uwe Kleine-König 2011-05-24 12 * gpio_led_register_device - register a gpio-led device
4440673a95e63a Uwe Kleine-König 2011-05-24 13 * @pdata: the platform data used for the new device
c5a87a4ac2bfec Lee Jones 2021-05-28 14 * @id: platform ID
4440673a95e63a Uwe Kleine-König 2011-05-24 15 *
4440673a95e63a Uwe Kleine-König 2011-05-24 16 * Makes a copy of pdata and pdata->leds and registers a new leds-gpio device
4440673a95e63a Uwe Kleine-König 2011-05-24 17 * with the result. This allows to have pdata and pdata-leds in .init.rodata
4440673a95e63a Uwe Kleine-König 2011-05-24 18 * and so saves some bytes compared to a static struct platform_device with
4440673a95e63a Uwe Kleine-König 2011-05-24 19 * static platform data.
4440673a95e63a Uwe Kleine-König 2011-05-24 20 *
4440673a95e63a Uwe Kleine-König 2011-05-24 21 * Returns the registered device or an error pointer.
4440673a95e63a Uwe Kleine-König 2011-05-24 22 */
4440673a95e63a Uwe Kleine-König 2011-05-24 @23 struct platform_device *__init gpio_led_register_device(
:::::: The code at line 23 was first introduced by commit
:::::: 4440673a95e63ad888a41db596edaa0c55d3a332 leds: provide helper to register "leds-gpio" devices
:::::: TO: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
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-02-26 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 22:58 [linux-next:master 9208/10236] drivers/leds/leds-gpio-register.c:23:25: warning: attribute declaration must precede definition 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