netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] staging: ipx: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-05  4:17 Arushi Singhal
  2018-03-05  6:01 ` Greg KH
  2018-03-05  7:16 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 2 replies; 3+ messages in thread
From: Arushi Singhal @ 2018-03-05  4:17 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, linux-kernel, outreachy-kernel

Replace printk having a log level with the appropriate
net_*macro_ratelimited.
It's better to use actual device name as a prefix in error messages.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
*In v1 printk was changed to pr_*macro(), which is used
in kernel instead of calling printk() directly. And for drivers,
dev_*macro() or net_*macro_ratelimited() should be used for calling
printk() directly.

changes in v3
*Indentation is not changed, as line is exceeding 80 characters limit.

 drivers/staging/ipx/af_ipx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ipx/af_ipx.c b/drivers/staging/ipx/af_ipx.c
index d21a9d1..5ec6591 100644
--- a/drivers/staging/ipx/af_ipx.c
+++ b/drivers/staging/ipx/af_ipx.c
@@ -744,7 +744,7 @@ static void ipxitf_discover_netnum(struct ipx_interface *intrfc,
 			intrfc->if_netnum = cb->ipx_source_net;
 			ipxitf_add_local_route(intrfc);
 		} else {
-			printk(KERN_WARNING "IPX: Network number collision "
+			net_warn_ratelimited("IPX: Network number collision "
 				"%lx\n        %s %s and %s %s\n",
 				(unsigned long) ntohl(cb->ipx_source_net),
 				ipx_device_name(i),
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-05  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05  4:17 [PATCH v3] staging: ipx: Replace printk() with appropriate net_*macro_ratelimited() Arushi Singhal
2018-03-05  6:01 ` Greg KH
2018-03-05  7:16 ` [Outreachy kernel] " Julia Lawall

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).