lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] lustre:include:linux:libcfs:libcfs_private.h:fixes the duplicate case value issue.
Date
From: Chowdegowda <Chowdegowda.MS@smartplayin.com>

In the expession used in switch statement must be a variable not a
constant integer. Expression for case statement must be constant
of same data type that should not be a variable.
---
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 2817112..0c222c5 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -408,7 +408,7 @@ int cfs_percpt_atomic_summary(atomic_t **refs);
* value after conversion...
*
*/
-#define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
+#define CLASSERT(cond) do {switch (cond) { case 0: case 1: break;} } while (0)

/* support decl needed both by kernel and liblustre */
int libcfs_isknown_lnd(int type);
--
1.9.1


\
 
 \ /
  Last update: 2015-01-30 11:41    [W:0.076 / U:5.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site