[HPDD-discuss] [PATCH] staging: lustre: libcfs: move assignment out of conditional

Patrick Farrell paf at cray.com
Mon Jul 13 12:50:46 UTC 2015


Looks good, thanks!
________________________________________
From: HPDD-discuss [hpdd-discuss-bounces at lists.01.org] on behalf of Perry Hooker [perry.hooker at gmail.com]
Sent: Sunday, July 12, 2015 9:22 PM
To: oleg.drokin at intel.com; andreas.dilger at intel.com; gregkh at linuxfoundation.org; devel at driverdev.osuosl.org; HPDD-discuss at lists.01.org
Cc: Perry Hooker
Subject: [HPDD-discuss] [PATCH] staging: lustre: libcfs: move assignment out    of conditional

Found by checkpatch.pl

Signed-off-by: Perry Hooker <perry.hooker at gmail.com>

 Please enter the commit message for your changes. Lines starting
---
 .../staging/lustre/include/linux/libcfs/libcfs_fail.h  | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 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..aa69c6a 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
@@ -79,14 +79,16 @@ 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)))) {
-               if (quiet) {
-                       CDEBUG(D_INFO, "*** cfs_fail_loc=%x, val=%u***\n",
-                              id, value);
-               } else {
-                       LCONSOLE_INFO("*** cfs_fail_loc=%x, val=%u***\n",
-                                     id, value);
+       if (unlikely(CFS_FAIL_PRECHECK(id))) {
+               ret = __cfs_fail_check_set(id, value, set);
+               if (ret) {
+                       if (quiet) {
+                               CDEBUG(D_INFO, "*** cfs_fail_loc=%x, val=%u***\n",
+                                      id, value);
+                       } else {
+                               LCONSOLE_INFO("*** cfs_fail_loc=%x, val=%u***\n",
+                                             id, value);
+                       }
                }
        }

--
2.1.4

_______________________________________________
HPDD-discuss mailing list
HPDD-discuss at lists.01.org
https://lists.01.org/mailman/listinfo/hpdd-discuss


More information about the devel mailing list