Skip to contentSkip to conversation

drivers: staging: lustre: lustre: lov: lov_request: Fixed a coding style warning.

PATCH In review Rakhi Sharma 4 participants 4 messages Feb 9, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: staging: lustre: lustre: lov: lov_request: Fixed a coding style warning.

Fixed a coding style warning.
WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/lustre/lustre/lov/lov_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lustre/lov/lov_request.c +1 -2
index 42deda7..c77b987 100644
@@ -340,9 +340,8 @@ int lov_fini_destroy_set(struct lov_request_set *set)
 	if (set == NULL)
 		return 0;
 	LASSERT(set->set_exp);
-	if (atomic_read(&set->set_completes)) {
+	if (atomic_read(&set->set_completes))
 		/* FIXME update qos data here */
-	}
 
 	lov_put_reqset(set);
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Rakhi Sharma

Fixed a coding style warning.
WARNING: braces {} are not necessary for single statement blocks

---

Better not touch this. At some point someone will implement the FIXME.

Quoted 18 lines
 drivers/staging/lustre/lustre/lov/lov_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lustre/lov/lov_request.c +1 -2
index 42deda7..c77b987 100644
@@ -340,9 +340,8 @@ int lov_fini_destroy_set(struct lov_request_set *set)
        if (set == NULL)
                return 0;
        LASSERT(set->set_exp);
-       if (atomic_read(&set->set_completes)) {
+       if (atomic_read(&set->set_completes))
                /* FIXME update qos data here */
-       }
 
        lov_put_reqset(set);
 
#2 lore raw
Quoted 8 lines · Daniel Baluta
Quoted 5 lines · Rakhi Sharma

Fixed a coding style warning.
WARNING: braces {} are not necessary for single statement blocks

---

Better not touch this. At some point someone will implement the FIXME.

Actually, it's much worse than this. A comment is not a statement. Now the lov_put_reqset(set); is under the if.

julia

Quoted 28 lines
Quoted 10 lines

 drivers/staging/lustre/lustre/lov/lov_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lustre/lov/lov_request.c +0 -0
index 42deda7..c77b987 100644

drivers/staging/lustre/lustre/lov/lov_request.c int lov_fini_destroy_set(struct lov_request_set *set) · line 347

Quoted 10 lines
drivers/staging/lustre/lustre/lov/lov_request.c +1 -2
@@ -340,9 +340,8 @@ int lov_fini_destroy_set(struct lov_request_set *set)
        if (set == NULL)
                return 0;
        LASSERT(set->set_exp);
-       if (atomic_read(&set->set_completes)) {
+       if (atomic_read(&set->set_completes))
                /* FIXME update qos data here */
-       }
 
        lov_put_reqset(set);
 

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAEnQRZDfqzRmAxwsMFehNOdBx6813BNncTC_x-jq-JhEUtKtjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

maintainer
#3 lore raw
In reply to Rakhi Sharma
Quoted 13 lines · Rakhi Sharma

Fixed a coding style warning.
WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/lustre/lustre/lov/lov_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lustre/lov/lov_request.c +0 -0
index 42deda7..c77b987 100644

drivers/staging/lustre/lustre/lov/lov_request.c int lov_fini_destroy_set(struct lov_request_set *set) · line 345

Quoted 7 lines
drivers/staging/lustre/lustre/lov/lov_request.c +1 -2
@@ -340,9 +340,8 @@ int lov_fini_destroy_set(struct lov_request_set *set)
 	if (set == NULL)
 		return 0;
 	LASSERT(set->set_exp);
-	if (atomic_read(&set->set_completes)) {
+	if (atomic_read(&set->set_completes))
 		/* FIXME update qos data here */
-	}

As Julia pointed out, you just changed the logic in the code :(