[PATCH 32/40] scsi: esas2r: esas2r: Add braces around the one-line if()

From: Lee Jones
Date: Thu Jul 23 2020 - 08:26:10 EST


In certain configurations esas2r_bugon() is sometimes NULLed by the compiler.

Fixes the following W=1 kernel build warning(s):

In file included from drivers/scsi/esas2r/esas2r_log.c:44:
drivers/scsi/esas2r/esas2r.h: In function âesas2r_rq_init_requestâ:
drivers/scsi/esas2r/esas2r.h:1229:17: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
1229 | esas2r_bugon();
| ^
NB: Lots of these - snipped for brevity

Cc: Bradley Grove <linuxdrivers@xxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/scsi/esas2r/esas2r.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h
index 7f43b95f4e945..e30d2f1f53685 100644
--- a/drivers/scsi/esas2r/esas2r.h
+++ b/drivers/scsi/esas2r/esas2r.h
@@ -1225,8 +1225,9 @@ static inline void esas2r_rq_init_request(struct esas2r_request *rq,

/* req_table entry should be NULL at this point - if not, halt */

- if (a->req_table[LOWORD(vrq->scsi.handle)])
+ if (a->req_table[LOWORD(vrq->scsi.handle)]) {
esas2r_bugon();
+ }

/* fill in the table for this handle so we can get back to the
* request.
--
2.25.1