mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
Subsystems (2)
PATCH 1/2 mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
From: Tudor Ambarus <[email protected]>
spi_nor_ready() returns 1 if ready, 0 if not ready and -errono on errors. Do the same in all the spi_nor_*_ready() children.
--- drivers/mtd/spi-nor/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/core.c +1 -1
@@ -640,7 +640,7 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)return -EIO ; } -return nor->bouncebuf[0 ] &FSR_READY ; +return !!(nor->bouncebuf[0 ] &FSR_READY ); }/**
Signature · 5 lines
2.23.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 2/2 mtd: spi-nor: Fix description of the sr_ready() return value
From: Tudor Ambarus <[email protected]>
The functions return 1 if ready, 0 if not ready, -errno on errors.
--- drivers/mtd/spi-nor/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/spi-nor/core.c +4 -4
@@ -499,7 +499,7 @@ int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr)* the flash is ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_xsr_ready (struct spi_nor *nor) {
@@ -542,7 +542,7 @@ static void spi_nor_clear_sr(struct spi_nor *nor)* for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_sr_ready (struct spi_nor *nor) {
@@ -606,7 +606,7 @@ static void spi_nor_clear_fsr(struct spi_nor *nor)* ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_fsr_ready (struct spi_nor *nor) {
@@ -647,7 +647,7 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)* spi_nor_ready() - Query the flash to see if it is ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_ready (struct spi_nor *nor) {
Signature · 5 lines
2.23.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value
Quoted 3 lines · On 21/04/20 12:01 pm, [email protected] wrote:
From: Tudor Ambarus <[email protected]>
The functions return 1 if ready, 0 if not ready, -errno on errors.
Quoted 39 lines
Signed-off-by Tudor Ambarus <[email protected]>--- drivers/mtd/spi-nor/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/mtd/spi-nor/core.c +3
-3@@ -499,7 +499,7 @@ int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr)* the flash is ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_xsr_ready (struct spi_nor *nor) {@@ -542,7 +542,7 @@ static void spi_nor_clear_sr(struct spi_nor *nor)* for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_sr_ready (struct spi_nor *nor) {@@ -606,7 +606,7 @@ static void spi_nor_clear_fsr(struct spi_nor *nor)* ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_fsr_ready (struct spi_nor *nor) {
drivers/mtd/spi-nor/core.c static int spi_nor_fsr_ready(struct spi_nor *nor) · line 653
Quoted 8 lines
drivers/mtd/spi-nor/core.c +1
-1@@ -647,7 +647,7 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)* spi_nor_ready() - Query the flash to see if it is ready for new commands. * @nor: pointer to 'struct spi_nor'. * -* Return: 0 on success, -errno otherwise. +* Return: 1 if ready, 0 if not ready, -errno on errors. */ static int spi_nor_ready (struct spi_nor *nor) {
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
[email protected]
AppliedRe: [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value
Quoted 11 lines · EEST Vignesh Raghavendra
Quoted 3 lines · On 21/04/20 12:01 pm, [email protected] wrote:
From: Tudor Ambarus <[email protected]>
The functions return 1 if ready, 0 if not ready, -errno on errors.
Reviewed-by Vignesh Raghavendra <[email protected]>Quoted 4 lines
Signed-off-by Tudor Ambarus <[email protected]>---
drivers/mtd/spi-nor/core.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)
Applied. Cheers.
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 3 lines · On 21/04/20 12:01 pm, [email protected] wrote:
From: Tudor Ambarus <[email protected]>
spi_nor_ready()returns 1 if ready, 0 if not ready and -errono on errors.
s/-errono/-errno
With that:
Quoted 13 lines
Do the same in all the spi_nor_*_ready() children.
Signed-off-by Tudor Ambarus <[email protected]>--- drivers/mtd/spi-nor/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/spi-nor/core.c +0
-0
drivers/mtd/spi-nor/core.c static int spi_nor_fsr_ready(struct spi_nor *nor) · line 646
Quoted 8 lines
drivers/mtd/spi-nor/core.c +1
-1@@ -640,7 +640,7 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)return -EIO ; } -return nor->bouncebuf[0 ] &FSR_READY ; +return !!(nor->bouncebuf[0 ] &FSR_READY ); }/**
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 9 lines · EEST Vignesh Raghavendra
Quoted 3 lines
From: Tudor Ambarus <[email protected]>
spi_nor_ready()returns 1 if ready, 0 if not ready and -errono on errors.s/-errono/-errno
With that:
Reviewed-by Vignesh Raghavendra <[email protected]>
Fixed the typo and applied. Cheers.
Quoted 6 lines
Quoted 6 lines
Do the same in all the spi_nor_*_ready() children.
Signed-off-by Tudor Ambarus <[email protected]>---
drivers/mtd/spi-nor/core.c| 2 +-
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/