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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Feb 2011 23:36:32 +0800
From:	ycwang <yenchengwang@...il.com>
To:	dbrownell@...rs.sourceforge.net, gregkh@...e.de,
	linux-kernel@...r.kernel.org
Cc:	ycwang <yenchengwang@...il.com>
Subject: [PATCH] usb: gadget: f_mass_storage: fixed a macro coding style issue

Fixed a macro coding style issue.

Signed-off-by: YenCheng Wang <yenchengwang@...il.com>
---
 drivers/usb/gadget/f_mass_storage.c |   44 +++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index b5dbb23..eccdf10 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -3122,31 +3122,37 @@ struct fsg_module_parameters {
 };
 
 #define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc)	\
-	module_param_array_named(prefix ## name, params.name, type,	\
-				 &prefix ## params.name ## _count,	\
-				 S_IRUGO);				\
-	MODULE_PARM_DESC(prefix ## name, desc)
+	do {								\
+		module_param_array_named(prefix ## name, params.name, type,\
+					 &prefix ## params.name ## _count,\
+					 S_IRUGO);			\
+		MODULE_PARM_DESC(prefix ## name, desc)			\
+	} while (0)
 
 #define _FSG_MODULE_PARAM(prefix, params, name, type, desc)		\
-	module_param_named(prefix ## name, params.name, type,		\
-			   S_IRUGO);					\
-	MODULE_PARM_DESC(prefix ## name, desc)
+	do {								\
+		module_param_named(prefix ## name, params.name, type,	\
+				   S_IRUGO);				\
+		MODULE_PARM_DESC(prefix ## name, desc)			\
+	} while (0)
 
 #define FSG_MODULE_PARAMETERS(prefix, params)				\
-	_FSG_MODULE_PARAM_ARRAY(prefix, params, file, charp,		\
-				"names of backing files or devices");	\
-	_FSG_MODULE_PARAM_ARRAY(prefix, params, ro, bool,		\
-				"true to force read-only");		\
-	_FSG_MODULE_PARAM_ARRAY(prefix, params, removable, bool,	\
-				"true to simulate removable media");	\
-	_FSG_MODULE_PARAM_ARRAY(prefix, params, cdrom, bool,		\
+	do {								\
+		_FSG_MODULE_PARAM_ARRAY(prefix, params, file, charp,	\
+					"names of backing files or devices");\
+		_FSG_MODULE_PARAM_ARRAY(prefix, params, ro, bool,	\
+					"true to force read-only");	\
+		_FSG_MODULE_PARAM_ARRAY(prefix, params, removable, bool,\
+					"true to simulate removable media");\
+		_FSG_MODULE_PARAM_ARRAY(prefix, params, cdrom, bool,	\
 				"true to simulate CD-ROM instead of disk"); \
-	_FSG_MODULE_PARAM_ARRAY(prefix, params, nofua, bool,		\
+		_FSG_MODULE_PARAM_ARRAY(prefix, params, nofua, bool,	\
 				"true to ignore SCSI WRITE(10,12) FUA bit"); \
-	_FSG_MODULE_PARAM(prefix, params, luns, uint,			\
-			  "number of LUNs");				\
-	_FSG_MODULE_PARAM(prefix, params, stall, bool,			\
-			  "false to prevent bulk stalls")
+		_FSG_MODULE_PARAM(prefix, params, luns, uint,		\
+				  "number of LUNs");			\
+		_FSG_MODULE_PARAM(prefix, params, stall, bool,		\
+				  "false to prevent bulk stalls")	\
+	} while (0)
 
 static void
 fsg_config_from_params(struct fsg_config *cfg,
-- 
1.7.0.4

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