lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1406480913-31378-1-git-send-email-nthery@gmail.com>
Date:	Sun, 27 Jul 2014 19:08:33 +0200
From:	Nicolas Thery <nthery@...il.com>
To:	marek.belisko@...il.com, gregkh@...uxfoundation.org, me@...o.io
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	nthery@...il.com
Subject: [PATCH] staging: ft1000: fix some checkpatch complaints

This patch fixes the following errors and warnings:

ft1000_proc.c:26: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
ft1000_proc.c:27: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
ft1000_proc.c:33: ERROR: Macros with multiple statements should be enclosed in a do - while loop
ft1000_proc.c:40: ERROR: Macros with multiple statements should be enclosed in a do - while loop
ft1000_proc.c:49: WARNING: static const char * array should probably be static const char * const
ft1000_proc.c:53: WARNING: static const char * array should probably be static const char * const

Signed-off-by: Nicolas Thery <nthery@...il.com>
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
index 88f6f9c..28a2744 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
@@ -23,34 +23,38 @@
 #include <linux/string.h>
 #include <linux/vmalloc.h>
 #include <linux/netdevice.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
 #include "ft1000.h"
 
 #define FT1000_PROC "ft1000"
 #define MAX_FILE_LEN 255
 
-#define seq_putx(m, message, size, var) \
+#define seq_putx(m, message, size, var) 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])
+	seq_printf(m, "%02x\n", var[i]); \
+} while (0)
 
-#define seq_putd(m, message, size, var) \
+#define seq_putd(m, message, size, var) 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])
+	seq_printf(m, "%d\n", var[i]); \
+} while (0)
 
 static int ft1000ReadProc(struct seq_file *m, void *v)
 {
-	static const char *status[] = {
+	static const char * const status[] = {
 		"Idle (Disconnect)", "Searching", "Active (Connected)",
 		"Waiting for L2", "Sleep", "No Coverage", "", ""
 	};
-	static const char *signal[] = { "", "*", "**", "***", "****" };
+	static const char * const signal[] = {
+		"", "*", "**", "***", "****"
+	};
 
 	struct net_device *dev = m->private;
 	struct ft1000_info *info = netdev_priv(dev);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ