]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: spi-nor: stm32-quadspi: replace "%p" with "%pK"
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Fri, 6 Jul 2018 13:05:25 +0000 (15:05 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 1 Aug 2018 07:18:55 +0000 (09:18 +0200)
The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/spi-nor/stm32-quadspi.c

index 72553506a00bac5982d0db9907627650e6774979..13e9fc961d3bae7a9491338ecd086cf4b8d13729 100644 (file)
@@ -355,7 +355,7 @@ static int stm32_qspi_read_reg(struct spi_nor *nor,
        struct device *dev = flash->qspi->dev;
        struct stm32_qspi_cmd cmd;
 
-       dev_dbg(dev, "read_reg: cmd:%#.2x buf:%p len:%#x\n", opcode, buf, len);
+       dev_dbg(dev, "read_reg: cmd:%#.2x buf:%pK len:%#x\n", opcode, buf, len);
 
        memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = opcode;
@@ -376,7 +376,7 @@ static int stm32_qspi_write_reg(struct spi_nor *nor, u8 opcode,
        struct device *dev = flash->qspi->dev;
        struct stm32_qspi_cmd cmd;
 
-       dev_dbg(dev, "write_reg: cmd:%#.2x buf:%p len:%#x\n", opcode, buf, len);
+       dev_dbg(dev, "write_reg: cmd:%#.2x buf:%pK len:%#x\n", opcode, buf, len);
 
        memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = opcode;
@@ -398,7 +398,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len,
        struct stm32_qspi_cmd cmd;
        int err;
 
-       dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n",
+       dev_dbg(qspi->dev, "read(%#.2x): buf:%pK from:%#.8x len:%#zx\n",
                nor->read_opcode, buf, (u32)from, len);
 
        memset(&cmd, 0, sizeof(cmd));