diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2019-10-29 14:16:55 +0300 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@microchip.com> | 2019-11-01 09:28:52 +0300 |
commit | 17ccd0e4872290b5b24302b7520feefde03e5669 (patch) | |
tree | bbd548d1321f8e72412eced674090ac36a071325 /drivers/mtd/spi-nor/spi-nor.c | |
parent | ebe04bfe26dd816839d3d24fdeb5f6bed430a3df (diff) | |
download | linux-17ccd0e4872290b5b24302b7520feefde03e5669.tar.xz |
mtd: spi-nor: Drop explicit cast to int to already int value
ret is already of type int.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Diffstat (limited to 'drivers/mtd/spi-nor/spi-nor.c')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 4d3c37658ea5..e801f390728c 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -448,7 +448,7 @@ static int spi_nor_read_sr(struct spi_nor *nor) } if (ret) { - pr_err("error %d reading SR\n", (int) ret); + pr_err("error %d reading SR\n", ret); return ret; } @@ -644,7 +644,7 @@ static int s3an_sr_ready(struct spi_nor *nor) ret = spi_nor_xread_sr(nor, nor->bouncebuf); 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; } @@ -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); if (ret < 0) goto sst_write_err; - WARN(ret != 1, "While writing 1 byte written %i bytes\n", - (int)ret); + WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); ret = spi_nor_wait_till_ready(nor); if (ret) goto sst_write_err; @@ -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); if (ret < 0) goto sst_write_err; - WARN(ret != 2, "While writing 2 bytes written %i bytes\n", - (int)ret); + WARN(ret != 2, "While writing 2 bytes written %i bytes\n", ret); ret = spi_nor_wait_till_ready(nor); if (ret) goto sst_write_err; @@ -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); if (ret < 0) goto sst_write_err; - WARN(ret != 1, "While writing 1 byte written %i bytes\n", - (int)ret); + WARN(ret != 1, "While writing 1 byte written %i bytes\n", ret); ret = spi_nor_wait_till_ready(nor); if (ret) goto sst_write_err; @@ -2755,7 +2752,7 @@ static int s3an_nor_setup(struct spi_nor *nor, ret = spi_nor_xread_sr(nor, nor->bouncebuf); 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; } |