[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111230225.mS4BKY1u-lkp@intel.com>
Date: Tue, 23 Nov 2021 02:48:02 +0800
From: kernel test robot <lkp@...el.com>
To: Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH v5 4/8] leds: trigger: netdev: rename and expose NETDEV
trigger enum and struct
Hi Ansuel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
[also build test ERROR on linus/master v5.16-rc2 next-20211118]
[cannot apply to pavel-leds/for-next robh/for-next net-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211112-233807
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 5833291ab6de9c3e2374336b51c814e515e8f3a5
config: arc-randconfig-r043-20211115 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/4aa7005c8428f867be20ecd0afe4bc2ccdf6da4a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211112-233807
git checkout 4aa7005c8428f867be20ecd0afe4bc2ccdf6da4a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/leds/trigger/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/leds/trigger/ledtrig-netdev.c:45:39: warning: 'struct led_netdev_data' declared inside parameter list will not be visible outside of this definition or declaration
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ^~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'set_baseline_state':
>> drivers/leds/trigger/ledtrig-netdev.c:48:53: error: invalid use of undefined type 'struct led_netdev_data'
48 | struct led_classdev *led_cdev = trigger_data->led_cdev;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:56:26: error: invalid use of undefined type 'struct led_netdev_data'
56 | if (!trigger_data->carrier_link_up) {
| ^~
>> drivers/leds/trigger/ledtrig-netdev.c:59:30: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
59 | if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:59:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/leds/trigger/ledtrig-netdev.c:59:64: error: invalid use of undefined type 'struct led_netdev_data'
59 | if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
| ^~
>> drivers/leds/trigger/ledtrig-netdev.c:68:30: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
68 | if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:68:62: error: invalid use of undefined type 'struct led_netdev_data'
68 | if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
| ^~
>> drivers/leds/trigger/ledtrig-netdev.c:69:30: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
69 | test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:69:62: error: invalid use of undefined type 'struct led_netdev_data'
69 | test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~
drivers/leds/trigger/ledtrig-netdev.c:70:60: error: invalid use of undefined type 'struct led_netdev_data'
70 | schedule_delayed_work(&trigger_data->work, 0);
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'device_name_show':
drivers/leds/trigger/ledtrig-netdev.c:80:35: error: invalid use of undefined type 'struct led_netdev_data'
80 | spin_lock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:81:48: error: invalid use of undefined type 'struct led_netdev_data'
81 | len = sprintf(buf, "%s\n", trigger_data->device_name);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:82:37: error: invalid use of undefined type 'struct led_netdev_data'
82 | spin_unlock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'device_name_store':
drivers/leds/trigger/ledtrig-netdev.c:96:47: error: invalid use of undefined type 'struct led_netdev_data'
96 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:98:35: error: invalid use of undefined type 'struct led_netdev_data'
98 | spin_lock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:100:25: error: invalid use of undefined type 'struct led_netdev_data'
100 | if (trigger_data->net_dev) {
| ^~
drivers/leds/trigger/ledtrig-netdev.c:101:37: error: invalid use of undefined type 'struct led_netdev_data'
101 | dev_put(trigger_data->net_dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:102:29: error: invalid use of undefined type 'struct led_netdev_data'
102 | trigger_data->net_dev = NULL;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:105:28: error: invalid use of undefined type 'struct led_netdev_data'
105 | memcpy(trigger_data->device_name, buf, size);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:106:21: error: invalid use of undefined type 'struct led_netdev_data'
106 | trigger_data->device_name[size] = 0;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:107:37: error: invalid use of undefined type 'struct led_netdev_data'
107 | if (size > 0 && trigger_data->device_name[size - 1] == '\n')
| ^~
drivers/leds/trigger/ledtrig-netdev.c:108:29: error: invalid use of undefined type 'struct led_netdev_data'
108 | trigger_data->device_name[size - 1] = 0;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:110:25: error: invalid use of undefined type 'struct led_netdev_data'
110 | if (trigger_data->device_name[0] != 0)
| ^~
drivers/leds/trigger/ledtrig-netdev.c:111:29: error: invalid use of undefined type 'struct led_netdev_data'
111 | trigger_data->net_dev =
| ^~
drivers/leds/trigger/ledtrig-netdev.c:112:60: error: invalid use of undefined type 'struct led_netdev_data'
112 | dev_get_by_name(&init_net, trigger_data->device_name);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:114:21: error: invalid use of undefined type 'struct led_netdev_data'
114 | trigger_data->carrier_link_up = false;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:115:25: error: invalid use of undefined type 'struct led_netdev_data'
115 | if (trigger_data->net_dev != NULL)
| ^~
drivers/leds/trigger/ledtrig-netdev.c:116:29: error: invalid use of undefined type 'struct led_netdev_data'
116 | trigger_data->carrier_link_up = netif_carrier_ok(trigger_data->net_dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:116:78: error: invalid use of undefined type 'struct led_netdev_data'
116 | trigger_data->carrier_link_up = netif_carrier_ok(trigger_data->net_dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:118:21: error: invalid use of undefined type 'struct led_netdev_data'
118 | trigger_data->last_activity = 0;
| ^~
>> drivers/leds/trigger/ledtrig-netdev.c:120:28: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
120 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:121:37: error: invalid use of undefined type 'struct led_netdev_data'
121 | spin_unlock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_led_attr_show':
drivers/leds/trigger/ledtrig-netdev.c:136:23: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
136 | bit = TRIGGER_NETDEV_LINK;
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:139:23: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
139 | bit = TRIGGER_NETDEV_TX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:142:23: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
142 | bit = TRIGGER_NETDEV_RX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:148:64: error: invalid use of undefined type 'struct led_netdev_data'
148 | return sprintf(buf, "%u\n", test_bit(bit, &trigger_data->mode));
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_led_attr_store':
drivers/leds/trigger/ledtrig-netdev.c:165:23: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
165 | bit = TRIGGER_NETDEV_LINK;
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:168:23: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
168 | bit = TRIGGER_NETDEV_TX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:171:23: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
171 | bit = TRIGGER_NETDEV_RX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:177:47: error: invalid use of undefined type 'struct led_netdev_data'
177 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:180:43: error: invalid use of undefined type 'struct led_netdev_data'
180 | set_bit(bit, &trigger_data->mode);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:182:45: error: invalid use of undefined type 'struct led_netdev_data'
182 | clear_bit(bit, &trigger_data->mode);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:184:28: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
184 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'interval_show':
drivers/leds/trigger/ledtrig-netdev.c:237:66: error: invalid use of undefined type 'struct led_netdev_data'
237 | jiffies_to_msecs(atomic_read(&trigger_data->interval)));
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'interval_store':
drivers/leds/trigger/ledtrig-netdev.c:254:55: error: invalid use of undefined type 'struct led_netdev_data'
254 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:256:41: error: invalid use of undefined type 'struct led_netdev_data'
256 | atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
| ^~
drivers/leds/trigger/ledtrig-netdev.c:257:36: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
257 | set_baseline_state(trigger_data); /* resets timer */
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from arch/arc/include/asm/cmpxchg.h:9,
from arch/arc/include/asm/atomic.h:13,
from include/linux/atomic.h:7,
from drivers/leds/trigger/ledtrig-netdev.c:13:
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_notify':
>> include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct led_netdev_data'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:17: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:17: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
In file included from <command-line>:
>> include/linux/compiler_types.h:140:41: error: invalid use of undefined type 'struct led_netdev_data'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:22:28: note: in expansion of macro 'offsetof'
22 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:17: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:288:34: error: invalid use of undefined type 'struct led_netdev_data'
288 | if (!(dev == trigger_data->net_dev ||
| ^~
drivers/leds/trigger/ledtrig-netdev.c:289:75: error: invalid use of undefined type 'struct led_netdev_data'
289 | (evt == NETDEV_CHANGENAME && !strcmp(dev->name, trigger_data->device_name)) ||
| ^~
drivers/leds/trigger/ledtrig-netdev.c:290:73: error: invalid use of undefined type 'struct led_netdev_data'
290 | (evt == NETDEV_REGISTER && !strcmp(dev->name, trigger_data->device_name))))
| ^~
drivers/leds/trigger/ledtrig-netdev.c:293:47: error: invalid use of undefined type 'struct led_netdev_data'
293 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:295:35: error: invalid use of undefined type 'struct led_netdev_data'
295 | spin_lock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:297:21: error: invalid use of undefined type 'struct led_netdev_data'
297 | trigger_data->carrier_link_up = false;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:301:33: error: invalid use of undefined type 'struct led_netdev_data'
301 | if (trigger_data->net_dev)
| ^~
drivers/leds/trigger/ledtrig-netdev.c:302:45: error: invalid use of undefined type 'struct led_netdev_data'
302 | dev_put(trigger_data->net_dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:304:29: error: invalid use of undefined type 'struct led_netdev_data'
304 | trigger_data->net_dev = dev;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:307:37: error: invalid use of undefined type 'struct led_netdev_data'
307 | dev_put(trigger_data->net_dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:308:29: error: invalid use of undefined type 'struct led_netdev_data'
308 | trigger_data->net_dev = NULL;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:312:29: error: invalid use of undefined type 'struct led_netdev_data'
312 | trigger_data->carrier_link_up = netif_carrier_ok(dev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:316:28: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
316 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:318:37: error: invalid use of undefined type 'struct led_netdev_data'
318 | spin_unlock_bh(&trigger_data->lock);
| ^~
In file included from arch/arc/include/asm/cmpxchg.h:9,
from arch/arc/include/asm/atomic.h:13,
from include/linux/atomic.h:7,
from drivers/leds/trigger/ledtrig-netdev.c:13:
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_work':
>> include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct led_netdev_data'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:17: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:17: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
In file included from <command-line>:
>> include/linux/compiler_types.h:140:41: error: invalid use of undefined type 'struct led_netdev_data'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:22:28: note: in expansion of macro 'offsetof'
22 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:17: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:335:26: error: invalid use of undefined type 'struct led_netdev_data'
335 | if (!trigger_data->net_dev) {
| ^~
drivers/leds/trigger/ledtrig-netdev.c:336:48: error: invalid use of undefined type 'struct led_netdev_data'
336 | led_set_brightness(trigger_data->led_cdev, LED_OFF);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:341:23: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
341 | if (!test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) &&
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:341:55: error: invalid use of undefined type 'struct led_netdev_data'
341 | if (!test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) &&
| ^~
drivers/leds/trigger/ledtrig-netdev.c:342:23: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
342 | !test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:342:55: error: invalid use of undefined type 'struct led_netdev_data'
342 | !test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~
drivers/leds/trigger/ledtrig-netdev.c:345:47: error: invalid use of undefined type 'struct led_netdev_data'
345 | dev_stats = dev_get_stats(trigger_data->net_dev, &temp);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:347:55: error: invalid use of undefined type 'struct led_netdev_data'
347 | (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ?
| ^~
drivers/leds/trigger/ledtrig-netdev.c:349:55: error: invalid use of undefined type 'struct led_netdev_data'
349 | (test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode) ?
| ^~
drivers/leds/trigger/ledtrig-netdev.c:352:25: error: invalid use of undefined type 'struct led_netdev_data'
352 | if (trigger_data->last_activity != new_activity) {
| ^~
drivers/leds/trigger/ledtrig-netdev.c:353:53: error: invalid use of undefined type 'struct led_netdev_data'
353 | led_stop_software_blink(trigger_data->led_cdev);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:355:35: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
355 | invert = test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode);
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:355:69: error: invalid use of undefined type 'struct led_netdev_data'
355 | invert = test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:357:58: error: invalid use of undefined type 'struct led_netdev_data'
357 | atomic_read(&trigger_data->interval));
| ^~
drivers/leds/trigger/ledtrig-netdev.c:359:51: error: invalid use of undefined type 'struct led_netdev_data'
359 | led_blink_set_oneshot(trigger_data->led_cdev,
| ^~
drivers/leds/trigger/ledtrig-netdev.c:363:29: error: invalid use of undefined type 'struct led_netdev_data'
363 | trigger_data->last_activity = new_activity;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:366:44: error: invalid use of undefined type 'struct led_netdev_data'
366 | schedule_delayed_work(&trigger_data->work,
| ^~
drivers/leds/trigger/ledtrig-netdev.c:367:51: error: invalid use of undefined type 'struct led_netdev_data'
367 | (atomic_read(&trigger_data->interval)*2));
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_activate':
>> drivers/leds/trigger/ledtrig-netdev.c:375:39: error: invalid application of 'sizeof' to incomplete type 'struct led_netdev_data'
375 | trigger_data = kzalloc(sizeof(struct led_netdev_data), GFP_KERNEL);
| ^~~~~~
In file included from include/linux/wait.h:9,
from include/linux/pid.h:6,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/leds/trigger/ledtrig-netdev.c:15:
drivers/leds/trigger/ledtrig-netdev.c:379:37: error: invalid use of undefined type 'struct led_netdev_data'
379 | spin_lock_init(&trigger_data->lock);
| ^~
include/linux/spinlock.h:333:45: note: in definition of macro 'spin_lock_init'
333 | __raw_spin_lock_init(spinlock_check(lock), \
| ^~~~
drivers/leds/trigger/ledtrig-netdev.c:381:21: error: invalid use of undefined type 'struct led_netdev_data'
381 | trigger_data->notifier.notifier_call = netdev_trig_notify;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:382:21: error: invalid use of undefined type 'struct led_netdev_data'
382 | trigger_data->notifier.priority = 10;
| ^~
In file included from include/linux/rhashtable-types.h:15,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/leds/trigger/ledtrig-netdev.c:15:
drivers/leds/trigger/ledtrig-netdev.c:384:40: error: invalid use of undefined type 'struct led_netdev_data'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~
include/linux/workqueue.h:228:30: note: in definition of macro '__INIT_WORK'
228 | __init_work((_work), _onstack); \
| ^~~~~
include/linux/workqueue.h:252:17: note: in expansion of macro 'INIT_WORK'
252 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:267:9: note: in expansion of macro '__INIT_DELAYED_WORK'
267 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:9: note: in expansion of macro 'INIT_DELAYED_WORK'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:40: error: invalid use of undefined type 'struct led_netdev_data'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~
include/linux/workqueue.h:229:18: note: in definition of macro '__INIT_WORK'
229 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
| ^~~~~
include/linux/workqueue.h:252:17: note: in expansion of macro 'INIT_WORK'
252 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:267:9: note: in expansion of macro '__INIT_DELAYED_WORK'
267 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:9: note: in expansion of macro 'INIT_DELAYED_WORK'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:40: error: invalid use of undefined type 'struct led_netdev_data'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~
include/linux/workqueue.h:230:36: note: in definition of macro '__INIT_WORK'
230 | lockdep_init_map(&(_work)->lockdep_map, "(work_completion)"#_work, &__key, 0); \
| ^~~~~
include/linux/workqueue.h:252:17: note: in expansion of macro 'INIT_WORK'
252 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:267:9: note: in expansion of macro '__INIT_DELAYED_WORK'
267 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:9: note: in expansion of macro 'INIT_DELAYED_WORK'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:40: error: invalid use of undefined type 'struct led_netdev_data'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~
include/linux/workqueue.h:231:34: note: in definition of macro '__INIT_WORK'
231 | INIT_LIST_HEAD(&(_work)->entry); \
| ^~~~~
include/linux/workqueue.h:252:17: note: in expansion of macro 'INIT_WORK'
252 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:267:9: note: in expansion of macro '__INIT_DELAYED_WORK'
267 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:9: note: in expansion of macro 'INIT_DELAYED_WORK'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:384:40: error: invalid use of undefined type 'struct led_netdev_data'
384 | INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work);
| ^~
include/linux/workqueue.h:232:18: note: in definition of macro '__INIT_WORK'
232 | (_work)->func = (_func); \
| ^~~~~
include/linux/workqueue.h:252:17: note: in expansion of macro 'INIT_WORK'
252 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:267:9: note: in expansion of macro '__INIT_DELAYED_WORK'
vim +48 drivers/leds/trigger/ledtrig-netdev.c
06f502f57d0d77 Ben Whitten 2017-12-10 44
06f502f57d0d77 Ben Whitten 2017-12-10 @45 static void set_baseline_state(struct led_netdev_data *trigger_data)
06f502f57d0d77 Ben Whitten 2017-12-10 46 {
06f502f57d0d77 Ben Whitten 2017-12-10 47 int current_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 @48 struct led_classdev *led_cdev = trigger_data->led_cdev;
06f502f57d0d77 Ben Whitten 2017-12-10 49
06f502f57d0d77 Ben Whitten 2017-12-10 50 current_brightness = led_cdev->brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 51 if (current_brightness)
06f502f57d0d77 Ben Whitten 2017-12-10 52 led_cdev->blink_brightness = current_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 53 if (!led_cdev->blink_brightness)
06f502f57d0d77 Ben Whitten 2017-12-10 54 led_cdev->blink_brightness = led_cdev->max_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 55
df437de7347286 Ansuel Smith 2021-11-12 56 if (!trigger_data->carrier_link_up) {
06f502f57d0d77 Ben Whitten 2017-12-10 57 led_set_brightness(led_cdev, LED_OFF);
df437de7347286 Ansuel Smith 2021-11-12 58 } else {
4aa7005c8428f8 Ansuel Smith 2021-11-12 @59 if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
06f502f57d0d77 Ben Whitten 2017-12-10 60 led_set_brightness(led_cdev,
06f502f57d0d77 Ben Whitten 2017-12-10 61 led_cdev->blink_brightness);
06f502f57d0d77 Ben Whitten 2017-12-10 62 else
06f502f57d0d77 Ben Whitten 2017-12-10 63 led_set_brightness(led_cdev, LED_OFF);
06f502f57d0d77 Ben Whitten 2017-12-10 64
06f502f57d0d77 Ben Whitten 2017-12-10 65 /* If we are looking for RX/TX start periodically
06f502f57d0d77 Ben Whitten 2017-12-10 66 * checking stats
06f502f57d0d77 Ben Whitten 2017-12-10 67 */
4aa7005c8428f8 Ansuel Smith 2021-11-12 @68 if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
4aa7005c8428f8 Ansuel Smith 2021-11-12 @69 test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
06f502f57d0d77 Ben Whitten 2017-12-10 70 schedule_delayed_work(&trigger_data->work, 0);
06f502f57d0d77 Ben Whitten 2017-12-10 71 }
06f502f57d0d77 Ben Whitten 2017-12-10 72 }
06f502f57d0d77 Ben Whitten 2017-12-10 73
06f502f57d0d77 Ben Whitten 2017-12-10 74 static ssize_t device_name_show(struct device *dev,
06f502f57d0d77 Ben Whitten 2017-12-10 75 struct device_attribute *attr, char *buf)
06f502f57d0d77 Ben Whitten 2017-12-10 76 {
f8112a1de1a728 Uwe Kleine-König 2018-07-02 77 struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
06f502f57d0d77 Ben Whitten 2017-12-10 78 ssize_t len;
06f502f57d0d77 Ben Whitten 2017-12-10 79
06f502f57d0d77 Ben Whitten 2017-12-10 80 spin_lock_bh(&trigger_data->lock);
06f502f57d0d77 Ben Whitten 2017-12-10 81 len = sprintf(buf, "%s\n", trigger_data->device_name);
06f502f57d0d77 Ben Whitten 2017-12-10 82 spin_unlock_bh(&trigger_data->lock);
06f502f57d0d77 Ben Whitten 2017-12-10 83
06f502f57d0d77 Ben Whitten 2017-12-10 84 return len;
06f502f57d0d77 Ben Whitten 2017-12-10 85 }
06f502f57d0d77 Ben Whitten 2017-12-10 86
06f502f57d0d77 Ben Whitten 2017-12-10 87 static ssize_t device_name_store(struct device *dev,
06f502f57d0d77 Ben Whitten 2017-12-10 88 struct device_attribute *attr, const char *buf,
06f502f57d0d77 Ben Whitten 2017-12-10 89 size_t size)
06f502f57d0d77 Ben Whitten 2017-12-10 90 {
f8112a1de1a728 Uwe Kleine-König 2018-07-02 91 struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
06f502f57d0d77 Ben Whitten 2017-12-10 92
06f502f57d0d77 Ben Whitten 2017-12-10 93 if (size >= IFNAMSIZ)
06f502f57d0d77 Ben Whitten 2017-12-10 94 return -EINVAL;
06f502f57d0d77 Ben Whitten 2017-12-10 95
06f502f57d0d77 Ben Whitten 2017-12-10 96 cancel_delayed_work_sync(&trigger_data->work);
06f502f57d0d77 Ben Whitten 2017-12-10 97
06f502f57d0d77 Ben Whitten 2017-12-10 98 spin_lock_bh(&trigger_data->lock);
06f502f57d0d77 Ben Whitten 2017-12-10 99
06f502f57d0d77 Ben Whitten 2017-12-10 100 if (trigger_data->net_dev) {
06f502f57d0d77 Ben Whitten 2017-12-10 101 dev_put(trigger_data->net_dev);
06f502f57d0d77 Ben Whitten 2017-12-10 102 trigger_data->net_dev = NULL;
06f502f57d0d77 Ben Whitten 2017-12-10 103 }
06f502f57d0d77 Ben Whitten 2017-12-10 104
909346433064b8 Rasmus Villemoes 2019-03-14 105 memcpy(trigger_data->device_name, buf, size);
909346433064b8 Rasmus Villemoes 2019-03-14 106 trigger_data->device_name[size] = 0;
06f502f57d0d77 Ben Whitten 2017-12-10 107 if (size > 0 && trigger_data->device_name[size - 1] == '\n')
06f502f57d0d77 Ben Whitten 2017-12-10 108 trigger_data->device_name[size - 1] = 0;
06f502f57d0d77 Ben Whitten 2017-12-10 109
06f502f57d0d77 Ben Whitten 2017-12-10 110 if (trigger_data->device_name[0] != 0)
06f502f57d0d77 Ben Whitten 2017-12-10 111 trigger_data->net_dev =
06f502f57d0d77 Ben Whitten 2017-12-10 112 dev_get_by_name(&init_net, trigger_data->device_name);
06f502f57d0d77 Ben Whitten 2017-12-10 113
df437de7347286 Ansuel Smith 2021-11-12 114 trigger_data->carrier_link_up = false;
06f502f57d0d77 Ben Whitten 2017-12-10 115 if (trigger_data->net_dev != NULL)
df437de7347286 Ansuel Smith 2021-11-12 116 trigger_data->carrier_link_up = netif_carrier_ok(trigger_data->net_dev);
06f502f57d0d77 Ben Whitten 2017-12-10 117
06f502f57d0d77 Ben Whitten 2017-12-10 118 trigger_data->last_activity = 0;
06f502f57d0d77 Ben Whitten 2017-12-10 119
06f502f57d0d77 Ben Whitten 2017-12-10 @120 set_baseline_state(trigger_data);
06f502f57d0d77 Ben Whitten 2017-12-10 121 spin_unlock_bh(&trigger_data->lock);
06f502f57d0d77 Ben Whitten 2017-12-10 122
06f502f57d0d77 Ben Whitten 2017-12-10 123 return size;
06f502f57d0d77 Ben Whitten 2017-12-10 124 }
06f502f57d0d77 Ben Whitten 2017-12-10 125
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (42294 bytes)
Powered by blists - more mailing lists