This changes the logic here; the assignment is done conditionally based on the precheck. ________________________________________ From: HPDD-discuss [[email protected]] on behalf of Perry Hooker [[email protected]] Sent: Sunday, July 12, 2015 4:27 PM To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected] Cc: Perry Hooker Subject: [HPDD-discuss] [PATCH] staging: lustre: libcfs: move assignment out of if condition
Found by checkpatch.pl Signed-off-by: Perry Hooker <[email protected]> --- drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h index eea55d9..133ff34 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h @@ -79,8 +79,9 @@ static inline int cfs_fail_check_set(__u32 id, __u32 value, { int ret = 0; - if (unlikely(CFS_FAIL_PRECHECK(id) && - (ret = __cfs_fail_check_set(id, value, set)))) { + ret = __cfs_fail_check_set(id, value, set); + + if (unlikely(CFS_FAIL_PRECHECK(id) && ret)) { if (quiet) { CDEBUG(D_INFO, "*** cfs_fail_loc=%x, val=%u***\n", id, value); -- 2.1.4 _______________________________________________ HPDD-discuss mailing list [email protected] https://lists.01.org/mailman/listinfo/hpdd-discuss _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
