* [PATCH] wimax: Use WARN(1,...) rather than printk followed by WARN_ON(1)
@ 2013-10-08 0:30 djduanjiong
2013-10-11 18:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: djduanjiong @ 2013-10-08 0:30 UTC (permalink / raw)
To: Inaky Perez-Gonzalez, David S. Miller, linux-wimax
Cc: wimax, netdev, Duan Jiong
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
net/wimax/id-table.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/wimax/id-table.c b/net/wimax/id-table.c
index 72273ab..635a4d2 100644
--- a/net/wimax/id-table.c
+++ b/net/wimax/id-table.c
@@ -136,10 +136,8 @@ void wimax_id_table_release(void)
return;
#endif
spin_lock(&wimax_id_table_lock);
- list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) {
- printk(KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n",
+ list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node)
+ WARN(1, KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n",
__func__, wimax_dev, wimax_dev->net_dev->ifindex);
- WARN_ON(1);
- }
spin_unlock(&wimax_id_table_lock);
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] wimax: Use WARN(1,...) rather than printk followed by WARN_ON(1)
2013-10-08 0:30 [PATCH] wimax: Use WARN(1,...) rather than printk followed by WARN_ON(1) djduanjiong
@ 2013-10-11 18:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-11 18:38 UTC (permalink / raw)
To: djduanjiong; +Cc: inaky.perez-gonzalez, linux-wimax, wimax, netdev, duanj.fnst
From: djduanjiong@gmail.com
Date: Mon, 7 Oct 2013 17:30:38 -0700
> - list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) {
> - printk(KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n",
> + list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node)
> + WARN(1, KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n",
> __func__, wimax_dev, wimax_dev->net_dev->ifindex);
You are changing the column where the openning parenthesis appears by
changing the printk() into a WARN(), therefore you have to adjust the
indentation of the next line such that the arguments start at the first
column after the openning parenthesis.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-11 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 0:30 [PATCH] wimax: Use WARN(1,...) rather than printk followed by WARN_ON(1) djduanjiong
2013-10-11 18:38 ` 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).