* [PATCH] Staging: ft1000-usb: wrap macros in do while
@ 2014-04-01 6:29 Anders Darander
2014-04-01 6:29 ` [PATCH] Staging: ft1000-usb: use netdev_warn Anders Darander
0 siblings, 1 reply; 2+ messages in thread
From: Anders Darander @ 2014-04-01 6:29 UTC (permalink / raw)
To: gregkh; +Cc: marek.belisko, devel, linux-kernel, Anders Darander
Fix coding style issue by wrapping the macro in a do {} while (0).
Signed-off-by: Anders Darander <anders.darander@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
index 2575d0d..28f07a7 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
@@ -32,17 +32,20 @@
#define seq_putx(m, message, size, var) \
- seq_printf(m, message); \
- for (i = 0; i < (size - 1); i++) \
- seq_printf(m, "%02x:", var[i]); \
- seq_printf(m, "%02x\n", var[i])
+ do { \
+ seq_printf(m, message); \
+ for (i = 0; i < (size - 1); i++) \
+ seq_printf(m, "%02x:", var[i]); \
+ seq_printf(m, "%02x\n", var[i]); \
+ } while (0)
#define seq_putd(m, message, size, var) \
- seq_printf(m, message); \
- for (i = 0; i < (size - 1); i++) \
- seq_printf(m, "%d.", var[i]); \
- seq_printf(m, "%d\n", var[i])
-
+ do { \
+ seq_printf(m, message); \
+ for (i = 0; i < (size - 1); i++) \
+ seq_printf(m, "%d.", var[i]); \
+ seq_printf(m, "%d\n", var[i]); \
+ } while (0)
#define FTNET_PROC init_net.proc_net
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Staging: ft1000-usb: use netdev_warn
2014-04-01 6:29 [PATCH] Staging: ft1000-usb: wrap macros in do while Anders Darander
@ 2014-04-01 6:29 ` Anders Darander
0 siblings, 0 replies; 2+ messages in thread
From: Anders Darander @ 2014-04-01 6:29 UTC (permalink / raw)
To: gregkh; +Cc: marek.belisko, devel, linux-kernel, Anders Darander
Fix coding style issue by replacing printk with netdev_warn.
Signed-off-by: Anders Darander <anders.darander@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
index 28f07a7..e89b5d2 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
@@ -203,7 +203,7 @@ int ft1000_init_proc(struct net_device *dev)
info->ft1000_proc_dir = proc_mkdir(FT1000_PROC_DIR, FTNET_PROC);
if (info->ft1000_proc_dir == NULL) {
- printk(KERN_WARNING "Unable to create %s dir.\n",
+ netdev_warn(dev, "Unable to create %s dir.\n",
FT1000_PROC_DIR);
goto fail;
}
@@ -213,7 +213,7 @@ int ft1000_init_proc(struct net_device *dev)
&ft1000_proc_fops, dev);
if (!ft1000_proc_file) {
- printk(KERN_WARNING "Unable to create /proc entry.\n");
+ netdev_warn(dev, "Unable to create /proc entry.\n");
goto fail_entry;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-01 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 6:29 [PATCH] Staging: ft1000-usb: wrap macros in do while Anders Darander
2014-04-01 6:29 ` [PATCH] Staging: ft1000-usb: use netdev_warn Anders Darander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.