Skip to contentSkip to conversation

mtd: fsl-quadspi: Include <linux/sizes.h> to avoid build error

PATCH Applied Fabio Estevam 2 participants 2 messages Oct 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: fsl-quadspi: Include <linux/sizes.h> to avoid build error

From: Fabio Estevam <[email protected]>

Building for x86 results in the following build errors:

drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_init_lut':

Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:355:21: error: 'SZ_16M' undeclared (first use in this function)

     if (q->nor_size <= SZ_16M) {
                        ^

drivers/mtd/spi-nor/fsl-quadspi.c:355:21: note: each undeclared identifier is reported only once for each function it appears in drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_read':

Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:208:27: error: 'SZ_4M' undeclared (first use in this function)

    #define QUADSPI_MIN_IOMAP SZ_4M
                              ^
Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:845:25: note: in expansion of macro 'QUADSPI_MIN_IOMAP'

      q->memmap_len = len > QUADSPI_MIN_IOMAP ? len : QUADSPI_MIN_IOMAP;

Explicitly include <linux/sizes.h> to fix the problem.

---
 drivers/mtd/spi-nor/fsl-quadspi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/spi-nor/fsl-quadspi.c +1 -0
index 2954f89..1af0e1d 100644
@@ -28,6 +28,7 @@
 #include <linux/mtd/spi-nor.h>
 #include <linux/mutex.h>
 #include <linux/pm_qos.h>
+#include <linux/sizes.h>
 
 /* Controller needs driver to swap endian */
 #define QUADSPI_QUIRK_SWAP_ENDIAN	(1 << 0)
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 13 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Building for x86 results in the following build errors:

drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_init_lut':

Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:355:21: error: 'SZ_16M' undeclared (first use in this function)

     if (q->nor_size <= SZ_16M) {
                        ^

drivers/mtd/spi-nor/fsl-quadspi.c:355:21: note: each undeclared identifier is reported only once for each function it appears in drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_read':

Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:208:27: error: 'SZ_4M' undeclared (first use in this function)

    #define QUADSPI_MIN_IOMAP SZ_4M
                              ^
Quoted 7 lines
Quoted 1 line
Quoted 1 line

drivers/mtd/spi-nor/fsl-quadspi.c:845:25: note: in expansion of macro 'QUADSPI_MIN_IOMAP'

      q->memmap_len = len > QUADSPI_MIN_IOMAP ? len : QUADSPI_MIN_IOMAP;

Explicitly include <linux/sizes.h> to fix the problem.

Applied to l2-mtd.git. Thanks.