* [net-next:master 53/61] net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if'
@ 2017-03-13 6:49 kbuild test robot
2017-03-13 7:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2017-03-13 6:49 UTC (permalink / raw)
To: Jiri Kosina; +Cc: kbuild-all, netdev
[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 429a372e3ec020534bd314dca94e5281dc453d29
commit: 49b499718fa1b0d639663cfd03085b9bfd23cdc8 [53/61] net: sched: make default fifo qdiscs appear in the dump
config: i386-randconfig-x077-201711 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 49b499718fa1b0d639663cfd03085b9bfd23cdc8
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from net/sched/sch_tbf.c:15:
net/sched/sch_tbf.c: In function 'tbf_change':
include/linux/compiler.h:160:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
include/linux/compiler.h:158:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
>> net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if'
if (child != &noop_qdisc);
^~
net/sched/sch_tbf.c:400:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
qdisc_hash_add(child, true);
^~~~~~~~~~~~~~
vim +/if +399 net/sched/sch_tbf.c
383 if (err)
384 goto done;
385 } else if (qopt->limit > 0) {
386 child = fifo_create_dflt(sch, &bfifo_qdisc_ops, qopt->limit);
387 if (IS_ERR(child)) {
388 err = PTR_ERR(child);
389 goto done;
390 }
391 }
392
393 sch_tree_lock(sch);
394 if (child) {
395 qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen,
396 q->qdisc->qstats.backlog);
397 qdisc_destroy(q->qdisc);
398 q->qdisc = child;
> 399 if (child != &noop_qdisc);
400 qdisc_hash_add(child, true);
401 }
402 q->limit = qopt->limit;
403 if (tb[TCA_TBF_PBURST])
404 q->mtu = mtu;
405 else
406 q->mtu = PSCHED_TICKS2NS(qopt->mtu);
407 q->max_size = max_size;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24109 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [net-next:master 53/61] net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if'
2017-03-13 6:49 [net-next:master 53/61] net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if' kbuild test robot
@ 2017-03-13 7:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-13 7:00 UTC (permalink / raw)
To: fengguang.wu; +Cc: jkosina, kbuild-all, netdev
From: kbuild test robot <fengguang.wu@intel.com>
Date: Mon, 13 Mar 2017 14:49:27 +0800
>>> net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if'
> if (child != &noop_qdisc);
> ^~
> net/sched/sch_tbf.c:400:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
> qdisc_hash_add(child, true);
> ^~~~~~~~~~~~~~
Now fixes as follows:
====================
[PATCH] sch_tbf: Remove bogus semicolon in if() conditional.
Fixes: 49b499718fa1 ("net: sched: make default fifo qdiscs appear in the dump")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/sched/sch_tbf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 40c29a8..9850126 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -396,7 +396,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
q->qdisc->qstats.backlog);
qdisc_destroy(q->qdisc);
q->qdisc = child;
- if (child != &noop_qdisc);
+ if (child != &noop_qdisc)
qdisc_hash_add(child, true);
}
q->limit = qopt->limit;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 6:49 [net-next:master 53/61] net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if' kbuild test robot
2017-03-13 7:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).