scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if()
authorLee Jones <lee.jones@linaro.org>
Mon, 2 Nov 2020 14:23:48 +0000 (14:23 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 Nov 2020 03:27:46 +0000 (22:27 -0500)
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/esas2r/esas2r_disc.c: In function ‘esas2r_disc_get_phys_addr’:
 drivers/scsi/esas2r/esas2r_disc.c:1035:17: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Link: https://lore.kernel.org/r/20201102142359.561122-9-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>
drivers/scsi/esas2r/esas2r_disc.c

index 1c079f4..ba42536 100644 (file)
@@ -1031,8 +1031,9 @@ static u32 esas2r_disc_get_phys_addr(struct esas2r_sg_context *sgc, u64 *addr)
 {
        struct esas2r_adapter *a = sgc->adapter;
 
-       if (sgc->length > ESAS2R_DISC_BUF_LEN)
+       if (sgc->length > ESAS2R_DISC_BUF_LEN) {
                esas2r_bugon();
+       }
 
        *addr = a->uncached_phys
                + (u64)((u8 *)a->disc_buffer - a->uncached);