aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLee Jones2020-07-23 13:24:38 +0100
committerMartin K. Petersen2020-07-24 22:32:52 -0400
commite36e0427a46a95961238115efe450b2399a6cc9b (patch)
treec2714cc47ac45d444d50741230e251d4a7844e85 /drivers/scsi
parent56d244fe89c972ebb8dcf40175d8fdd8cfa25743 (diff)
scsi: esas2r: Add braces around the one-line if()
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 Link: https://lore.kernel.org/r/20200723122446.1329773-33-lee.jones@linaro.org Cc: Bradley Grove <linuxdrivers@attotech.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/esas2r/esas2r.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h
index 7f43b95f4e94..e30d2f1f5368 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.