summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/mdc/mdc_request.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-02 12:26:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-02 13:03:04 +0100
commitf440d909085e497540788fecc056dc39ea0471ed (patch)
treec2100604c07c552f8cbb05a8a60a99f0462d0c31 /drivers/staging/lustre/lustre/mdc/mdc_request.c
parent757b9bd074312090107bc2582b27c04ea0eb2b88 (diff)
downloadop-kernel-dev-f440d909085e497540788fecc056dc39ea0471ed.zip
op-kernel-dev-f440d909085e497540788fecc056dc39ea0471ed.tar.gz
staging: lustre: remove CLASSERT macro
lustre uses a fake switch() statement as a compile-time assert, but unfortunately each use of that causes a warning when building with clang: drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case matching constant switch condition '42' drivers/staging/lustre/lnet/klnds/socklnd/../../../include/linux/libcfs/libcfs_private.h:294:36: note: expanded from macro 'CLASSERT' #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0) As Greg suggested, let's just kill off this macro completely instead of fixing it. This replaces it with BUILD_BUG_ON(), which means we have to negate all the conditions in the process. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mdc/mdc_request.c')
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 2cfd913..b0dfb6b 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -295,7 +295,7 @@ static int mdc_xattr_common(struct obd_export *exp,
if (opcode == MDS_REINT) {
struct mdt_rec_setxattr *rec;
- CLASSERT(sizeof(struct mdt_rec_setxattr) ==
+ BUILD_BUG_ON(sizeof(struct mdt_rec_setxattr) !=
sizeof(struct mdt_rec_reint));
rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
rec->sx_opcode = REINT_SETXATTR;
OpenPOWER on IntegriCloud