Commit ecca81f8 authored by Cyrille Pitchen's avatar Cyrille Pitchen

mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST

This patch fixes some compiler errors:
- change format strings to use %zx for size_t
- add missing #include <linux/sizes.h>

Cc: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
parent fe488a5e
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/sizes.h>
#define QUADSPI_CR 0x00 #define QUADSPI_CR 0x00
#define CR_EN BIT(0) #define CR_EN BIT(0)
...@@ -375,7 +376,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len, ...@@ -375,7 +376,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len,
struct stm32_qspi_cmd cmd; struct stm32_qspi_cmd cmd;
int err; int err;
dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#x\n", dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n",
nor->read_opcode, buf, (u32)from, len); nor->read_opcode, buf, (u32)from, len);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
...@@ -402,7 +403,7 @@ static ssize_t stm32_qspi_write(struct spi_nor *nor, loff_t to, size_t len, ...@@ -402,7 +403,7 @@ static ssize_t stm32_qspi_write(struct spi_nor *nor, loff_t to, size_t len,
struct stm32_qspi_cmd cmd; struct stm32_qspi_cmd cmd;
int err; int err;
dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#x\n", dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#zx\n",
nor->program_opcode, buf, (u32)to, len); nor->program_opcode, buf, (u32)to, len);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment