From: Quanyang Wang <quanyang.w...@windriver.com>

Because SST_GLOBAL_PROT_UNLK is BIT(16) which exceed the extent of
u16, so change it to u32.

drivers/mtd/spi-nor/spi-nor.c:2076:12: warning: large integer implicitly 
truncated to
unsigned type [-Woverflow]
   .flags = (_flags),
            ^
drivers/mtd/spi-nor/spi-nor.c:2385:19: note: in expansion of macro ‘INFO’
{ "sst26wf016B", INFO(0xbf2651, 0, 64 * 1024, 32, SECT_4K | 
SST_GLOBAL_PROT_UNLK) },
                   ^~~~

Signed-off-by: Quanyang Wang <quanyang.w...@windriver.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index d3b287e851cf..0c412b77597a 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -268,7 +268,7 @@ struct flash_info {
        u16             page_size;
        u16             addr_width;
 
-       u16             flags;
+       u32             flags;
 #define SECT_4K                        BIT(0)  /* SPINOR_OP_BE_4K works 
uniformly */
 #define SPI_NOR_NO_ERASE       BIT(1)  /* No erase command needed */
 #define SST_WRITE              BIT(2)  /* use SST byte programming */
-- 
2.17.1

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to