bcm63xx: redboot: fix warning
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Thu, 14 May 2020 14:10:40 +0000 (16:10 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Thu, 14 May 2020 14:12:12 +0000 (16:12 +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>
target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch

index b80f096413b326bdaf1edbb9d8bb5ec65d6336cf..f57950b44a652c6d4cde68f8d2b6acc1b2652d50 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));
 +                      }
 +              }
 +      }