diff mbox

wimax: Use WARN(1,...) rather than printk followed by WARN_ON(1)

Message ID 1381192238-6486-1-git-send-email-duanj.fnst@cn.fujitsu.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

duanjiong Oct. 8, 2013, 12:30 a.m. UTC
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(-)

Comments

David Miller Oct. 11, 2013, 6:38 p.m. UTC | #1
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 }