* [PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl.
@ 2015-06-12 9:51 Dean Lee
2015-06-12 14:34 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Dean Lee @ 2015-06-12 9:51 UTC (permalink / raw)
To: gregkh, devel, linux-wireless
Cc: johnny.kim, chris.park, rachel.kim, dean.lee
Remove the following warnings in the wilc_log.h:
- unnecessary whitespace before a quoted newline
- line over 80 characters
- single statement macros should not use a do {} while (0) loop.
Signed-off-by: Dean Lee <dean.lee@atmel.com>
---
drivers/staging/wilc1000/wilc_log.h | 53 +++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_log.h b/drivers/staging/wilc1000/wilc_log.h
index 2269ebd..93f467a 100644
--- a/drivers/staging/wilc1000/wilc_log.h
+++ b/drivers/staging/wilc1000/wilc_log.h
@@ -2,46 +2,53 @@
#define __WILC_LOG_H__
/* Errors will always get printed */
-#define WILC_ERROR(...) do { WILC_PRINTF("(ERR)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
- } while (0)
+#define WILC_ERROR(...) \
+do { \
+ WILC_PRINTF("(ERR)(%s:%d)", __WILC_FUNCTION__, __WILC_LINE__); \
+ WILC_PRINTF(__VA_ARGS__); \
+} while (0)
/* Wraning only printed if verbosity is 1 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 0)
-#define WILC_WARN(...) do { WILC_PRINTF("(WRN)"); \
- WILC_PRINTF(__VA_ARGS__); \
- } while (0)
+#define WILC_WARN(...) \
+do { \
+ WILC_PRINTF("(WRN)"); \
+ WILC_PRINTF(__VA_ARGS__); \
+} while (0)
#else
-#define WILC_WARN(...) (0)
+#define WILC_WARN(...) (0)
#endif
/* Info only printed if verbosity is 2 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 1)
-#define WILC_INFO(...) do { WILC_PRINTF("(INF)"); \
- WILC_PRINTF(__VA_ARGS__); \
- } while (0)
+#define WILC_INFO(...) \
+do { \
+ WILC_PRINTF("(INF)"); \
+ WILC_PRINTF(__VA_ARGS__); \
+} while (0)
#else
-#define WILC_INFO(...) (0)
+#define WILC_INFO(...) (0)
#endif
/* Debug is only printed if verbosity is 3 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 2)
-#define WILC_DBG(...) do { WILC_PRINTF("(DBG)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
- } while (0)
-
+#define WILC_DBG(...) \
+do { \
+ WILC_PRINTF("(DBG)(%s:%d)", __WILC_FUNCTION__, __WILC_LINE__); \
+ WILC_PRINTF(__VA_ARGS__); \
+} while (0)
#else
-#define WILC_DBG(...) (0)
+#define WILC_DBG(...) (0)
#endif
/* Function In/Out is only printed if verbosity is 4 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 3)
-#define WILC_FN_IN do { WILC_PRINTF("(FIN) (%s:%d) \n", __WILC_FUNCTION__, __WILC_LINE__); } while (0)
-#define WILC_FN_OUT(ret) do { WILC_PRINTF("(FOUT) (%s:%d) %d.\n", __WILC_FUNCTION__, __WILC_LINE__, (ret)); } while (0)
+#define WILC_FN_IN \
+ WILC_PRINTF("(FIN)(%s:%d)\n", __WILC_FUNCTION__, __WILC_LINE__)
+#define WILC_FN_OUT(ret) \
+ WILC_PRINTF("(FOUT)(%s:%d)%d\n", __WILC_FUNCTION__, __WILC_LINE__, ret)
#else
-#define WILC_FN_IN (0)
-#define WILC_FN_OUT(ret) (0)
+#define WILC_FN_IN (0)
+#define WILC_FN_OUT(ret) (0)
+#endif
#endif
-
-
-#endif
\ No newline at end of file
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl.
2015-06-12 9:51 [PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl Dean Lee
@ 2015-06-12 14:34 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-06-12 14:34 UTC (permalink / raw)
To: Dean Lee; +Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim
On Fri, Jun 12, 2015 at 06:51:56PM +0900, Dean Lee wrote:
> Remove the following warnings in the wilc_log.h:
> - unnecessary whitespace before a quoted newline
> - line over 80 characters
> - single statement macros should not use a do {} while (0) loop.
Those are different things, so this should be broken up into different
patches. Please make this a series of patches, each one only doing one
type of thing.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-12 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 9:51 [PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl Dean Lee
2015-06-12 14:34 ` Greg KH
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).