diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-02-02 12:26:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-02 13:03:04 +0100 |
commit | f440d909085e497540788fecc056dc39ea0471ed (patch) | |
tree | c2100604c07c552f8cbb05a8a60a99f0462d0c31 /drivers/staging/lustre/lustre/mdc/mdc_locks.c | |
parent | staging: bcm2835: mark all symbols as 'static' (diff) | |
download | linux-dev-f440d909085e497540788fecc056dc39ea0471ed.tar.xz linux-dev-f440d909085e497540788fecc056dc39ea0471ed.zip |
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_locks.c')
-rw-r--r-- | drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 54ebb9952d66..41165f4536d0 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -1196,7 +1196,7 @@ int mdc_intent_getattr_async(struct obd_export *exp, return rc; } - CLASSERT(sizeof(*ga) <= sizeof(req->rq_async_args)); + BUILD_BUG_ON(sizeof(*ga) > sizeof(req->rq_async_args)); ga = ptlrpc_req_async_args(req); ga->ga_exp = exp; ga->ga_minfo = minfo; |