[chrome-os:chromeos-5.4 21/21] drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:232:7: warning: this statement may fall through
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: a98547e350e9e17e150d23cb0afa1cd587f0a370
commit: a98547e350e9e17e150d23cb0afa1cd587f0a370 [21/21] CHROMIUM: platform/iio: cros_ec_activity: add body_detection push event
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout a98547e350e9e17e150d23cb0afa1cd587f0a370
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c: In function 'cros_ec_activity_push_data':
>> drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:232:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
232 | dir = IIO_EV_DIR_FALLING;
| ~~~~^~~~~~~~~~~~~~~~~~~~
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:233:2: note: here
233 | default:
| ^~~~~~~
vim +232 drivers/iio/common/cros_ec_sensors/cros_ec_activity.c
204
205 static int cros_ec_activity_push_data(
206 struct iio_dev *indio_dev,
207 s16 *data,
208 s64 timestamp)
209 {
210 struct ec_response_activity_data *activity_data =
211 (struct ec_response_activity_data *)data;
212 enum motionsensor_activity activity = activity_data->activity;
213 uint8_t state = activity_data->state;
214 const struct cros_ec_sensors_state *st = iio_priv(indio_dev);
215 const struct iio_chan_spec *chan;
216 const struct iio_event_spec *event;
217 enum iio_event_direction dir;
218 int index;
219 u64 ev;
220
221 switch (activity) {
222 case MOTIONSENSE_ACTIVITY_BODY_DETECTION:
223 index = st->body_detection_channel_index;
224 dir = state ? IIO_EV_DIR_FALLING : IIO_EV_DIR_RISING;
225 break;
226 case MOTIONSENSE_ACTIVITY_SIG_MOTION:
227 index = st->sig_motion_channel_index;
228 dir = IIO_EV_DIR_FALLING;
229 break;
230 case MOTIONSENSE_ACTIVITY_DOUBLE_TAP:
231 index = st->double_tap_channel_index;
> 232 dir = IIO_EV_DIR_FALLING;
233 default:
234 dev_warn(&indio_dev->dev, "Unknown activity: %d\n", activity);
235 return 0;
236 }
237 chan = &st->channels[index];
238 event = &chan->event_spec[0];
239
240 ev = IIO_UNMOD_EVENT_CODE(chan->type, index, event->type, dir);
241 iio_push_event(indio_dev, ev, timestamp);
242 return 0;
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH net-next v2 09/12] gtp: support GRO
by kernel test robot
Hi Jonas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jonas-Bonn/gtp-IPv6-support/2020...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 91163f82143630a9629a8bf0227d49173697c69c
config: mips-randconfig-r026-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/de5669628a8f684dd7ed378aaf2a99722...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jonas-Bonn/gtp-IPv6-support/20201211-203639
git checkout de5669628a8f684dd7ed378aaf2a997221d243fa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/gtp.c:402:2: warning: variable 'err' is used uninitialized whenever 'if' condition is true
if (!ptype)
^~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/gtp.c:413:9: note: uninitialized use occurs here
return err;
^~~
drivers/net/gtp.c:402:2: note: remove the 'if' if its condition is always false
if (!ptype)
^~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
^
>> drivers/net/gtp.c:396:2: warning: variable 'err' is used uninitialized whenever switch default is taken
default:
^~~~~~~
drivers/net/gtp.c:413:9: note: uninitialized use occurs here
return err;
^~~
drivers/net/gtp.c:372:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 153, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $1, $2 # atomic_fetch_add
addu $0, $1, $3
sc $0, $2
beqz $0, 1b
.set pop
move $0, $1
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (git://gitmirror/llvm_project 5ff35356f1af2bb92785b38c657463924d9ec386)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-5ff35356f1/bin
clang-12: note: diagnostic msg:
Makefile arch drivers include kernel scripts source usr
vim +402 drivers/net/gtp.c
363
364 static int gtp_gro_complete(struct sock *sk, struct sk_buff * skb, int nhoff)
365 {
366 size_t hdrlen;
367 char* gtphdr = skb->data + nhoff;
368 u8 version;
369 __be16 type;
370 struct packet_offload *ptype;
371 uint8_t ipver;
372 int err;
373
374 version = *gtphdr >> 5;
375 switch (version) {
376 case GTP_V0:
377 hdrlen = sizeof(struct gtp0_header);
378 break;
379 case GTP_V1:
380 hdrlen = sizeof(struct gtp1_header);
381 if (*gtphdr & GTP1_F_MASK)
382 hdrlen += 4;
383 break;
384 }
385
386 skb_set_inner_network_header(skb, nhoff + hdrlen);
387
388 ipver = inner_ip_hdr(skb)->version;
389 switch (ipver) {
390 case 4:
391 type = cpu_to_be16(ETH_P_IP);
392 break;
393 case 6:
394 type = cpu_to_be16(ETH_P_IPV6);
395 break;
> 396 default:
397 goto out;
398 }
399
400 rcu_read_lock();
401 ptype = gro_find_complete_by_type(type);
> 402 if (!ptype)
403 goto out_unlock;
404
405 err = ptype->callbacks.gro_complete(skb, nhoff + hdrlen);
406
407 skb_set_inner_mac_header(skb, nhoff + hdrlen);
408
409 out_unlock:
410 rcu_read_unlock();
411 out:
412
413 return err;
414
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH] i2c: sprd: use a specific timeout to avoid system hang up issue
by kernel test robot
Hi Chunyan,
I love your patch! Yet something to improve:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v5.10-rc7 next-20201211]
[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/Chunyan-Zhang/i2c-sprd-use-a-spe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: mips-randconfig-r035-20201209 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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/725c61cfaa18f63c1fbc7f4a25a04a72c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chunyan-Zhang/i2c-sprd-use-a-specific-timeout-to-avoid-system-hang-up-issue/20201211-182817
git checkout 725c61cfaa18f63c1fbc7f4a25a04a72c4fbda48
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/i2c/busses/i2c-sprd.c: In function 'sprd_i2c_handle_msg':
>> drivers/i2c/busses/i2c-sprd.c:249:43: error: 'I2C_XFER_TIMEOUT' undeclared (first use in this function); did you mean 'IC2_XFER_TIMEOUT'?
249 | unsigned long timeout = msecs_to_jiffies(I2C_XFER_TIMEOUT);
| ^~~~~~~~~~~~~~~~
| IC2_XFER_TIMEOUT
drivers/i2c/busses/i2c-sprd.c:249:43: note: each undeclared identifier is reported only once for each function it appears in
vim +249 drivers/i2c/busses/i2c-sprd.c
244
245 static int sprd_i2c_handle_msg(struct i2c_adapter *i2c_adap,
246 struct i2c_msg *msg, bool is_last_msg)
247 {
248 struct sprd_i2c *i2c_dev = i2c_adap->algo_data;
> 249 unsigned long timeout = msecs_to_jiffies(I2C_XFER_TIMEOUT);
250
251 i2c_dev->msg = msg;
252 i2c_dev->buf = msg->buf;
253 i2c_dev->count = msg->len;
254
255 reinit_completion(&i2c_dev->complete);
256 sprd_i2c_reset_fifo(i2c_dev);
257 sprd_i2c_set_devaddr(i2c_dev, msg);
258 sprd_i2c_set_count(i2c_dev, msg->len);
259
260 if (msg->flags & I2C_M_RD) {
261 sprd_i2c_opt_mode(i2c_dev, 1);
262 sprd_i2c_send_stop(i2c_dev, 1);
263 } else {
264 sprd_i2c_opt_mode(i2c_dev, 0);
265 sprd_i2c_send_stop(i2c_dev, !!is_last_msg);
266 }
267
268 /*
269 * We should enable rx fifo full interrupt to get data when receiving
270 * full data.
271 */
272 if (msg->flags & I2C_M_RD)
273 sprd_i2c_set_fifo_full_int(i2c_dev, 1);
274 else
275 sprd_i2c_data_transfer(i2c_dev);
276
277 sprd_i2c_opt_start(i2c_dev);
278
279 timeout = wait_for_completion_timeout(&i2c_dev->complete, timeout);
280 if (!timeout)
281 return -EIO;
282
283 return i2c_dev->err;
284 }
285
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH net-next 3/4] sch_htb: Stats for offloaded HTB
by Dan Carpenter
Hi Maxim,
url: https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/2...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5
config: i386-randconfig-m021-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/sched/sch_htb.c:1310 htb_dump_class_stats() error: we previously assumed 'cl->leaf.q' could be null (see line 1300)
vim +1310 net/sched/sch_htb.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 1289 static int
87990467d387f92 Stephen Hemminger 2006-08-10 1290 htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1291 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1292 struct htb_class *cl = (struct htb_class *)arg;
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1293 struct htb_sched *q = qdisc_priv(sch);
338ed9b4de57c4b Eric Dumazet 2016-06-21 1294 struct gnet_stats_queue qs = {
338ed9b4de57c4b Eric Dumazet 2016-06-21 1295 .drops = cl->drops,
3c75f6ee139d464 Eric Dumazet 2017-09-18 1296 .overlimits = cl->overlimits,
338ed9b4de57c4b Eric Dumazet 2016-06-21 1297 };
6401585366326fc John Fastabend 2014-09-28 1298 __u32 qlen = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1299
5dd431b6b92c0db Paolo Abeni 2019-03-28 @1300 if (!cl->level && cl->leaf.q)
^^^^^^^^^^
Check for NULL
5dd431b6b92c0db Paolo Abeni 2019-03-28 1301 qdisc_qstats_qlen_backlog(cl->leaf.q, &qlen, &qs.backlog);
5dd431b6b92c0db Paolo Abeni 2019-03-28 1302
0564bf0afae443d Konstantin Khlebnikov 2016-07-16 1303 cl->xstats.tokens = clamp_t(s64, PSCHED_NS2TICKS(cl->tokens),
0564bf0afae443d Konstantin Khlebnikov 2016-07-16 1304 INT_MIN, INT_MAX);
0564bf0afae443d Konstantin Khlebnikov 2016-07-16 1305 cl->xstats.ctokens = clamp_t(s64, PSCHED_NS2TICKS(cl->ctokens),
0564bf0afae443d Konstantin Khlebnikov 2016-07-16 1306 INT_MIN, INT_MAX);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1307
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1308 if (q->offload) {
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1309 if (!cl->level) {
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 @1310 cl->bstats = cl->leaf.q->bstats;
^^^^^^^^^^^^
Unchecked dereference
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1311 cl->bstats.bytes += cl->bstats_bias.bytes;
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1312 cl->bstats.packets += cl->bstats_bias.packets;
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1313 } else {
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1314 htb_offload_aggregate_stats(q, cl);
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1315 }
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1316 }
1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1317
edb09eb17ed89ea Eric Dumazet 2016-06-06 1318 if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch),
edb09eb17ed89ea Eric Dumazet 2016-06-06 1319 d, NULL, &cl->bstats) < 0 ||
1c0d32fde5bdf11 Eric Dumazet 2016-12-04 1320 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 ||
338ed9b4de57c4b Eric Dumazet 2016-06-21 1321 gnet_stats_copy_queue(d, NULL, &qs, qlen) < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1322 return -1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1323
^1da177e4c3f415 Linus Torvalds 2005-04-16 1324 return gnet_stats_copy_app(d, &cl->xstats, sizeof(cl->xstats));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1325 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[jwboyer-fedora:f32 36/42] drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f32
head: c34b5926fefd7940f0420b6916c4454ff1a5b071
commit: 6b2ec5ddfcafbe21b594532881beb0da3095c6e6 [36/42] PCI: Add MCFG quirks for Tegra194 host controllers
config: arm64-randconfig-r035-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/commit...
git remote add jwboyer-fedora https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
git fetch --no-tags jwboyer-fedora f32
git checkout 6b2ec5ddfcafbe21b594532881beb0da3095c6e6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq' [-Wunused-const-variable]
static const unsigned int pcie_gen_freq[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:262:18: warning: unused variable 'event_cntr_ctrl_offset' [-Wunused-const-variable]
static const u32 event_cntr_ctrl_offset[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:271:18: warning: unused variable 'event_cntr_data_offset' [-Wunused-const-variable]
static const u32 event_cntr_data_offset[] = {
^
3 warnings generated.
vim +/pcie_gen_freq +255 drivers/pci/controller/dwc/pcie-tegra194.c
c57247f940e8ea Vidya Sagar 2020-03-03 254
56e15a238d9278 Vidya Sagar 2019-08-13 @255 static const unsigned int pcie_gen_freq[] = {
56e15a238d9278 Vidya Sagar 2019-08-13 256 GEN1_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 257 GEN2_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 258 GEN3_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 259 GEN4_CORE_CLK_FREQ
56e15a238d9278 Vidya Sagar 2019-08-13 260 };
56e15a238d9278 Vidya Sagar 2019-08-13 261
:::::: The code at line 255 was first introduced by commit
:::::: 56e15a238d92788a2d09e0c5c26a5de1b3156931 PCI: tegra: Add Tegra194 PCIe support
:::::: TO: Vidya Sagar <vidyas(a)nvidia.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[intel-linux-intel-lts:4.19/android_r 19120/20689] arch/x86/kernel/smp.c:273:1: warning: unused label 'finish'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: 4a6aef8d991e7c47e5da39927e0ad28ec90cd01b
commit: b652a52d36a85d1b731921ba08e701d7150ce200 [19120/20689] Merge branch 'aosp/android-4.19-stable' into android_r
config: x86_64-randconfig-r005-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/b652a52d36a85d1b731921ba0...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout b652a52d36a85d1b731921ba08e701d7150ce200
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/x86/kernel/smp.c:190:16: warning: no previous prototype for function 'smp_reboot_interrupt' [-Wmissing-prototypes]
__visible void smp_reboot_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:190:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void smp_reboot_interrupt(struct pt_regs *regs)
^
static
>> arch/x86/kernel/smp.c:273:1: warning: unused label 'finish' [-Wunused-label]
finish:
^~~~~~~
arch/x86/kernel/smp.c:285:28: warning: no previous prototype for function 'smp_reschedule_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_reschedule_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:285:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_reschedule_interrupt(struct pt_regs *regs)
^
static
arch/x86/kernel/smp.c:306:28: warning: no previous prototype for function 'smp_call_function_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:306:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
^
static
arch/x86/kernel/smp.c:316:28: warning: no previous prototype for function 'smp_call_function_single_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_call_function_single_interrupt(struct pt_regs *r)
^
arch/x86/kernel/smp.c:316:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_call_function_single_interrupt(struct pt_regs *r)
^
static
5 warnings generated.
vim +/finish +273 arch/x86/kernel/smp.c
7d007d21e539db Don Zickus 2012-05-11 185
f9e47a126be2ea Glauber Costa 2008-03-03 186 /*
f9e47a126be2ea Glauber Costa 2008-03-03 187 * this function calls the 'stop' function on all other CPUs in the system.
f9e47a126be2ea Glauber Costa 2008-03-03 188 */
f9e47a126be2ea Glauber Costa 2008-03-03 189
cd7b77710e3d52 Duan, YayongX 2017-12-27 @190 __visible void smp_reboot_interrupt(struct pt_regs *regs)
4ef702c10b5df1 Andi Kleen 2009-05-27 191 {
6dc17876055360 Thomas Gleixner 2015-05-15 192 ipi_entering_ack_irq();
cd7b77710e3d52 Duan, YayongX 2017-12-27 193 store_regs(regs);
fba4f472b33aa8 Tiantian Feng 2017-04-19 194 cpu_emergency_vmxoff();
4ef702c10b5df1 Andi Kleen 2009-05-27 195 stop_this_cpu(NULL);
4ef702c10b5df1 Andi Kleen 2009-05-27 196 irq_exit();
4ef702c10b5df1 Andi Kleen 2009-05-27 197 }
4ef702c10b5df1 Andi Kleen 2009-05-27 198
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 199 static int register_stop_handler(void)
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 200 {
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 201 return register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 202 NMI_FLAG_FIRST, "smp_stop");
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 203 }
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 204
5d2b86d90f7cc4 Don Zickus 2012-05-11 205 static void native_stop_other_cpus(int wait)
f9e47a126be2ea Glauber Costa 2008-03-03 206 {
f9e47a126be2ea Glauber Costa 2008-03-03 207 unsigned long flags;
76fac077db6b34 Alok Kataria 2010-10-11 208 unsigned long timeout;
f9e47a126be2ea Glauber Costa 2008-03-03 209
f9e47a126be2ea Glauber Costa 2008-03-03 210 if (reboot_force)
f9e47a126be2ea Glauber Costa 2008-03-03 211 return;
f9e47a126be2ea Glauber Costa 2008-03-03 212
4ef702c10b5df1 Andi Kleen 2009-05-27 213 /*
4ef702c10b5df1 Andi Kleen 2009-05-27 214 * Use an own vector here because smp_call_function
4ef702c10b5df1 Andi Kleen 2009-05-27 215 * does lots of things not suitable in a panic situation.
7d007d21e539db Don Zickus 2012-05-11 216 */
7d007d21e539db Don Zickus 2012-05-11 217
7d007d21e539db Don Zickus 2012-05-11 218 /*
7d007d21e539db Don Zickus 2012-05-11 219 * We start by using the REBOOT_VECTOR irq.
7d007d21e539db Don Zickus 2012-05-11 220 * The irq is treated as a sync point to allow critical
7d007d21e539db Don Zickus 2012-05-11 221 * regions of code on other cpus to release their spin locks
7d007d21e539db Don Zickus 2012-05-11 222 * and re-enable irqs. Jumping straight to an NMI might
7d007d21e539db Don Zickus 2012-05-11 223 * accidentally cause deadlocks with further shutdown/panic
7d007d21e539db Don Zickus 2012-05-11 224 * code. By syncing, we give the cpus up to one second to
7d007d21e539db Don Zickus 2012-05-11 225 * finish their work before we force them off with the NMI.
4ef702c10b5df1 Andi Kleen 2009-05-27 226 */
4ef702c10b5df1 Andi Kleen 2009-05-27 227 if (num_online_cpus() > 1) {
7d007d21e539db Don Zickus 2012-05-11 228 /* did someone beat us here? */
7d007d21e539db Don Zickus 2012-05-11 229 if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id()) != -1)
7d007d21e539db Don Zickus 2012-05-11 230 return;
7d007d21e539db Don Zickus 2012-05-11 231
7d007d21e539db Don Zickus 2012-05-11 232 /* sync above data before sending IRQ */
7d007d21e539db Don Zickus 2012-05-11 233 wmb();
7d007d21e539db Don Zickus 2012-05-11 234
4ef702c10b5df1 Andi Kleen 2009-05-27 235 apic->send_IPI_allbutself(REBOOT_VECTOR);
4ef702c10b5df1 Andi Kleen 2009-05-27 236
76fac077db6b34 Alok Kataria 2010-10-11 237 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 238 * Don't wait longer than a second for IPI completion. The
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 239 * wait request is not checked here because that would
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 240 * prevent an NMI shutdown attempt in case that not all
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 241 * CPUs reach shutdown state.
76fac077db6b34 Alok Kataria 2010-10-11 242 */
76fac077db6b34 Alok Kataria 2010-10-11 243 timeout = USEC_PER_SEC;
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 244 while (num_online_cpus() > 1 && timeout--)
4ef702c10b5df1 Andi Kleen 2009-05-27 245 udelay(1);
4ef702c10b5df1 Andi Kleen 2009-05-27 246 }
4ef702c10b5df1 Andi Kleen 2009-05-27 247
7d007d21e539db Don Zickus 2012-05-11 248 /* if the REBOOT_VECTOR didn't work, try with the NMI */
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 249 if (num_online_cpus() > 1) {
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 250 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 251 * If NMI IPI is enabled, try to register the stop handler
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 252 * and send the IPI. In any case try to wait for the other
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 253 * CPUs to stop.
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 254 */
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 255 if (!smp_no_nmi_ipi && !register_stop_handler()) {
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 256 /* Sync above data before sending IRQ */
7d007d21e539db Don Zickus 2012-05-11 257 wmb();
7d007d21e539db Don Zickus 2012-05-11 258
7d007d21e539db Don Zickus 2012-05-11 259 pr_emerg("Shutting down cpus with NMI\n");
7d007d21e539db Don Zickus 2012-05-11 260
7d007d21e539db Don Zickus 2012-05-11 261 apic->send_IPI_allbutself(NMI_VECTOR);
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 262 }
7d007d21e539db Don Zickus 2012-05-11 263 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 264 * Don't wait longer than 10 ms if the caller didn't
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 265 * reqeust it. If wait is true, the machine hangs here if
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 266 * one or more CPUs do not reach shutdown state.
7d007d21e539db Don Zickus 2012-05-11 267 */
7d007d21e539db Don Zickus 2012-05-11 268 timeout = USEC_PER_MSEC * 10;
7d007d21e539db Don Zickus 2012-05-11 269 while (num_online_cpus() > 1 && (wait || timeout--))
7d007d21e539db Don Zickus 2012-05-11 270 udelay(1);
7d007d21e539db Don Zickus 2012-05-11 271 }
7d007d21e539db Don Zickus 2012-05-11 272
7d007d21e539db Don Zickus 2012-05-11 @273 finish:
cd7b77710e3d52 Duan, YayongX 2017-12-27 274 store_regs(NULL);
f9e47a126be2ea Glauber Costa 2008-03-03 275 local_irq_save(flags);
f9e47a126be2ea Glauber Costa 2008-03-03 276 disable_local_APIC();
8838eb6c0bf3b6 Ashok Raj 2015-08-12 277 mcheck_cpu_clear(this_cpu_ptr(&cpu_info));
f9e47a126be2ea Glauber Costa 2008-03-03 278 local_irq_restore(flags);
f9e47a126be2ea Glauber Costa 2008-03-03 279 }
f9e47a126be2ea Glauber Costa 2008-03-03 280
:::::: The code at line 273 was first introduced by commit
:::::: 7d007d21e539dbecb6942c5734e6649f720982cf x86/reboot: Use NMI to assist in shutting down if IRQ fails
:::::: TO: Don Zickus <dzickus(a)redhat.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[android-common:android-4.14-stable 2/5] fs/incfs/main.c:40:22: error: initializer element is not constant
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: 8278cda5d9767db20d87f2d97e135534c43b07ae
commit: b38636bf5933cdfc7490ed5bb0cec3893a646bab [2/5] ANDROID: Incremental fs: Add v2 feature flag
config: i386-randconfig-c001-20201209 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout b38636bf5933cdfc7490ed5bb0cec3893a646bab
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kobject.h:21:0,
from include/linux/module.h:17,
from fs/incfs/main.c:7:
>> fs/incfs/main.c:40:22: error: initializer element is not constant
DECLARE_FEATURE_FLAG(corefs);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:40:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(corefs);
^~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:40:22: note: (near initialization for 'corefs_attr.show')
DECLARE_FEATURE_FLAG(corefs);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:40:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(corefs);
^~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:41:22: error: initializer element is not constant
DECLARE_FEATURE_FLAG(zstd);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:41:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(zstd);
^~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:41:22: note: (near initialization for 'zstd_attr.show')
DECLARE_FEATURE_FLAG(zstd);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:41:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(zstd);
^~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:42:22: error: initializer element is not constant
DECLARE_FEATURE_FLAG(v2);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:42:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(v2);
^~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:42:22: note: (near initialization for 'v2_attr.show')
DECLARE_FEATURE_FLAG(v2);
^
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
fs/incfs/main.c:38:36: note: in expansion of macro '_DECLARE_FEATURE_FLAG'
#define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
^~~~~~~~~~~~~~~~~~~~~
fs/incfs/main.c:42:1: note: in expansion of macro 'DECLARE_FEATURE_FLAG'
DECLARE_FEATURE_FLAG(v2);
^~~~~~~~~~~~~~~~~~~~
vim +40 fs/incfs/main.c
> 7 #include <linux/module.h>
8
9 #include <uapi/linux/incrementalfs.h>
10
11 #include "vfs.h"
12
13 #define INCFS_NODE_FEATURES "features"
14
15 static struct file_system_type incfs_fs_type = {
16 .owner = THIS_MODULE,
17 .name = INCFS_NAME,
18 .mount = incfs_mount_fs,
19 .kill_sb = incfs_kill_sb,
20 .fs_flags = 0
21 };
22
23 static struct kobject *sysfs_root, *featurefs_root;
24
25 static ssize_t supported(struct kobject *kobj,
26 struct kobj_attribute *attr, char *buff)
27 {
28 return snprintf(buff, PAGE_SIZE, "supported\n");
29 }
30
31 typedef ssize_t (*const attr_show)(struct kobject *kobj,
32 struct kobj_attribute *attr, char *buff);
33
34 #define _DECLARE_FEATURE_FLAG(name) \
35 static attr_show name##_show = supported; \
36 static struct kobj_attribute name##_attr = __ATTR_RO(name)
37
38 #define DECLARE_FEATURE_FLAG(name) _DECLARE_FEATURE_FLAG(name)
39
> 40 DECLARE_FEATURE_FLAG(corefs);
41 DECLARE_FEATURE_FLAG(zstd);
42 DECLARE_FEATURE_FLAG(v2);
43
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[ti:ti-rt-linux-5.4.y 12712/12848] drivers/soc/ti/k3-ringacc.c:1479:24: sparse: sparse: incorrect type in return expression (different address spaces)
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.4.y
head: 5408fe1faf9d469d0f9653c60c3e05098b7907b7
commit: c80de11c397fca6dc81ebad2af118cafad6800d7 [12712/12848] soc: ti: k3-ringacc: add AM64 DMA rings support.
config: arm64-randconfig-s032-20201209 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.4.y
git checkout c80de11c397fca6dc81ebad2af118cafad6800d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/soc/ti/k3-ringacc.c:1479:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct k3_ringacc * @@ got void [noderef] <asn:2> *[assigned] base_rt @@
drivers/soc/ti/k3-ringacc.c:1479:24: sparse: expected struct k3_ringacc *
drivers/soc/ti/k3-ringacc.c:1479:24: sparse: got void [noderef] <asn:2> *[assigned] base_rt
vim +1479 drivers/soc/ti/k3-ringacc.c
1454
1455 struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev,
1456 struct k3_ringacc_init_data *data)
1457 {
1458 struct device *dev = &pdev->dev;
1459 struct k3_ringacc *ringacc;
1460 void __iomem *base_rt;
1461 struct resource *res;
1462 int i;
1463
1464 ringacc = devm_kzalloc(dev, sizeof(*ringacc), GFP_KERNEL);
1465 if (!ringacc)
1466 return ERR_PTR(-ENOMEM);
1467
1468 ringacc->dev = dev;
1469 ringacc->dma_rings = true;
1470 ringacc->num_rings = data->num_rings;
1471 ringacc->tisci = data->tisci;
1472 ringacc->tisci_dev_id = data->tisci_dev_id;
1473
1474 mutex_init(&ringacc->req_lock);
1475
1476 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ringrt");
1477 base_rt = devm_ioremap_resource(dev, res);
1478 if (IS_ERR(base_rt))
> 1479 return base_rt;
1480
1481 ringacc->rings = devm_kzalloc(dev,
1482 sizeof(*ringacc->rings) *
1483 ringacc->num_rings * 2,
1484 GFP_KERNEL);
1485 ringacc->rings_inuse = devm_kcalloc(dev,
1486 BITS_TO_LONGS(ringacc->num_rings),
1487 sizeof(unsigned long), GFP_KERNEL);
1488
1489 if (!ringacc->rings || !ringacc->rings_inuse)
1490 return ERR_PTR(-ENOMEM);
1491
1492 for (i = 0; i < ringacc->num_rings; i++) {
1493 struct k3_ring *ring = &ringacc->rings[i];
1494
1495 ring->rt = base_rt + K3_DMARING_RT_REGS_STEP * i;
1496 ring->parent = ringacc;
1497 ring->ring_id = i;
1498 ring->proxy_id = K3_RINGACC_PROXY_NOT_USED;
1499
1500 ring = &ringacc->rings[ringacc->num_rings + i];
1501 ring->rt = base_rt + K3_DMARING_RT_REGS_STEP * i +
1502 K3_DMARING_RT_REGS_REVERSE_OFS;
1503 ring->parent = ringacc;
1504 ring->ring_id = i;
1505 ring->proxy_id = K3_RINGACC_PROXY_NOT_USED;
1506 ring->flags = K3_RING_FLAG_REVERSE;
1507 }
1508
1509 ringacc->tisci_ring_ops = &ringacc->tisci->ops.rm_ring_ops;
1510
1511 dev_info(dev, "Number of rings: %u\n", ringacc->num_rings);
1512
1513 return ringacc;
1514 }
1515 EXPORT_SYMBOL_GPL(k3_ringacc_dmarings_init);
1516
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months