[PATCH] lustre:include:linux:libcfs:libcfs_private.h:fixes the duplicate case value issue.

From: chowdegowda . ms
Date: Fri Jan 30 2015 - 05:32:19 EST


From: Chowdegowda <Chowdegowda.MS@xxxxxxxxxxxxxxx>

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

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