net/mac80211/led.c:34:16: error: no member named 'name' in 'struct led_trigger'

From: kernel test robot
Date: Thu May 20 2021 - 02:27:55 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: b64acb28da8394485f0762e657470c9fc33aca4d ath9k: fix build error with LEDS_CLASS=m
date: 4 months ago
config: powerpc64-randconfig-r011-20210520 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b64acb28da8394485f0762e657470c9fc33aca4d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b64acb28da8394485f0762e657470c9fc33aca4d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:79:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:83:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:85:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:87:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/mac80211/led.c:34:16: error: no member named 'name' in 'struct led_trigger'
local->rx_led.name = kasprintf(GFP_KERNEL, "%srx",
~~~~~~~~~~~~~ ^
net/mac80211/led.c:36:16: error: no member named 'name' in 'struct led_trigger'
local->tx_led.name = kasprintf(GFP_KERNEL, "%stx",
~~~~~~~~~~~~~ ^
net/mac80211/led.c:38:19: error: no member named 'name' in 'struct led_trigger'
local->assoc_led.name = kasprintf(GFP_KERNEL, "%sassoc",
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:40:19: error: no member named 'name' in 'struct led_trigger'
local->radio_led.name = kasprintf(GFP_KERNEL, "%sradio",
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:46:22: error: no member named 'name' in 'struct led_trigger'
kfree(local->rx_led.name);
~~~~~~~~~~~~~ ^
net/mac80211/led.c:47:22: error: no member named 'name' in 'struct led_trigger'
kfree(local->tx_led.name);
~~~~~~~~~~~~~ ^
net/mac80211/led.c:48:25: error: no member named 'name' in 'struct led_trigger'
kfree(local->assoc_led.name);
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:49:25: error: no member named 'name' in 'struct led_trigger'
kfree(local->radio_led.name);
~~~~~~~~~~~~~~~~ ^
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MAC80211_LEDS
Depends on NET && WIRELESS && MAC80211 && (LEDS_CLASS || LEDS_CLASS
Selected by
- CARL9170_LEDS && NETDEVICES && WLAN && WLAN_VENDOR_ATH && CARL9170


vim +34 net/mac80211/led.c

cdcb006fbe7a74 net/mac80211/ieee80211_led.c Ivo van Doorn 2008-01-07 31
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 32 void ieee80211_alloc_led_names(struct ieee80211_local *local)
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 33 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 @34 local->rx_led.name = kasprintf(GFP_KERNEL, "%srx",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 35 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 36 local->tx_led.name = kasprintf(GFP_KERNEL, "%stx",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 37 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 38 local->assoc_led.name = kasprintf(GFP_KERNEL, "%sassoc",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 39 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 40 local->radio_led.name = kasprintf(GFP_KERNEL, "%sradio",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 41 wiphy_name(local->hw.wiphy));
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 42 }
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 43
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 44 void ieee80211_free_led_names(struct ieee80211_local *local)
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 45 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 46 kfree(local->rx_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 47 kfree(local->tx_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 48 kfree(local->assoc_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 49 kfree(local->radio_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 50 }
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 51
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 52 static int ieee80211_tx_led_activate(struct led_classdev *led_cdev)
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 53 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 @54 struct ieee80211_local *local = container_of(led_cdev->trigger,
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 55 struct ieee80211_local,
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 56 tx_led);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 57
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 58 atomic_inc(&local->tx_led_active);
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 59
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 60 return 0;
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 61 }
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 62

:::::: The code at line 34 was first introduced by commit
:::::: 8d5c25856859bd826aca4b88103552a80b344cef mac80211: make LED triggering depend on activation

:::::: TO: Johannes Berg <johannes.berg@xxxxxxxxx>
:::::: CC: Johannes Berg <johannes.berg@xxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip