Commit 17ccd0e4 authored by Tudor Ambarus's avatar Tudor Ambarus

mtd: spi-nor: Drop explicit cast to int to already int value

ret is already of type int.
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
parent ebe04bfe
...@@ -448,7 +448,7 @@ static int spi_nor_read_sr(struct spi_nor *nor) ...@@ -448,7 +448,7 @@ static int spi_nor_read_sr(struct spi_nor *nor)
} }
if (ret) { if (ret) {
pr_err("error %d reading SR\n", (int) ret); pr_err("error %d reading SR\n", ret);
return ret; return ret;
} }
...@@ -644,7 +644,7 @@ static int s3an_sr_ready(struct spi_nor *nor) ...@@ -644,7 +644,7 @@ static int s3an_sr_ready(struct spi_nor *nor)
ret = spi_nor_xread_sr(nor, nor->bouncebuf); ret = spi_nor_xread_sr(nor, nor->bouncebuf);
if (ret) { if (ret) {
dev_err(nor->dev, "error %d reading XRDSR\n", (int) ret); dev_err(nor->dev, "error %d reading XRDSR\n", ret);
return ret; return ret;
} }
...@@ -2619,8 +2619,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -2619,8 +2619,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
ret = spi_nor_write_data(nor, to, 1, buf); ret = spi_nor_write_data(nor, to, 1, buf);
if (ret < 0) if (ret < 0)
goto sst_write_err; goto sst_write_err;
WARN(ret != 1, "While writing 1 byte written %i bytes\n", WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret);
(int)ret);
ret = spi_nor_wait_till_ready(nor); ret = spi_nor_wait_till_ready(nor);
if (ret) if (ret)
goto sst_write_err; goto sst_write_err;
...@@ -2635,8 +2634,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -2635,8 +2634,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
ret = spi_nor_write_data(nor, to, 2, buf + actual); ret = spi_nor_write_data(nor, to, 2, buf + actual);
if (ret < 0) if (ret < 0)
goto sst_write_err; goto sst_write_err;
WARN(ret != 2, "While writing 2 bytes written %i bytes\n", WARN(ret != 2, "While writing 2 bytes written %i bytes\n", ret);
(int)ret);
ret = spi_nor_wait_till_ready(nor); ret = spi_nor_wait_till_ready(nor);
if (ret) if (ret)
goto sst_write_err; goto sst_write_err;
...@@ -2658,8 +2656,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -2658,8 +2656,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
ret = spi_nor_write_data(nor, to, 1, buf + actual); ret = spi_nor_write_data(nor, to, 1, buf + actual);
if (ret < 0) if (ret < 0)
goto sst_write_err; goto sst_write_err;
WARN(ret != 1, "While writing 1 byte written %i bytes\n", WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret);
(int)ret);
ret = spi_nor_wait_till_ready(nor); ret = spi_nor_wait_till_ready(nor);
if (ret) if (ret)
goto sst_write_err; goto sst_write_err;
...@@ -2755,7 +2752,7 @@ static int s3an_nor_setup(struct spi_nor *nor, ...@@ -2755,7 +2752,7 @@ static int s3an_nor_setup(struct spi_nor *nor,
ret = spi_nor_xread_sr(nor, nor->bouncebuf); ret = spi_nor_xread_sr(nor, nor->bouncebuf);
if (ret) { if (ret) {
dev_err(nor->dev, "error %d reading XRDSR\n", (int) ret); dev_err(nor->dev, "error %d reading XRDSR\n", ret);
return ret; return ret;
} }
......
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