bcm63xx: redboot: fix warning
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Mon, 18 May 2020 07:12:30 +0000 (09:12 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Mon, 18 May 2020 08:55:06 +0000 (10:55 +0200)
drivers/mtd/parsers/redboot.c: In function 'parse_redboot_partitions':
drivers/mtd/parsers/redboot.c:194:59: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
     fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
                                       ~~~~~~~~~~~~~~~~~~~~^~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f314cbe54be4d90e748e18ae5e9fb00d5fd31c91)

target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch

index c693ace36324587bc76f49a617b738758b3be5cd..378983df17b9c02c1d316b97397a7ec2457f2d43 100644 (file)
@@ -40,7 +40,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
 +      } else {
 +              for (i = 0; i < numslots; i++) {
 +                      if (!strncmp(buf[i].name, "RedBoot", 8)) {
-+                              fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
++                              fis_origin = (buf[i].flash_base & ((master->size << 1) - 1));
 +                      }
 +              }
 +      }