* [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
@ 2020-04-21 6:31 Tudor.Ambarus
2020-04-21 6:31 ` [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
2020-04-28 12:06 ` [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Vignesh Raghavendra
0 siblings, 2 replies; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-21 6:31 UTC (permalink / raw)
To: vigneshr, sergei.shtylyov; +Cc: linux-mtd, Tudor.Ambarus
From: Tudor Ambarus <tudor.ambarus@microchip.com>
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.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/mtd/spi-nor/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index cc68ea84318e..9dcc53bda8b0 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -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);
}
/**
--
2.23.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value
2020-04-21 6:31 [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Tudor.Ambarus
@ 2020-04-21 6:31 ` Tudor.Ambarus
2020-04-28 12:21 ` Vignesh Raghavendra
2020-04-28 12:06 ` [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Vignesh Raghavendra
1 sibling, 1 reply; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-21 6:31 UTC (permalink / raw)
To: vigneshr, sergei.shtylyov; +Cc: linux-mtd, Tudor.Ambarus
From: Tudor Ambarus <tudor.ambarus@microchip.com>
The functions return 1 if ready, 0 if not ready, -errno on errors.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/mtd/spi-nor/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 9dcc53bda8b0..9611553e829f 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -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)
{
--
2.23.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
2020-04-21 6:31 [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Tudor.Ambarus
2020-04-21 6:31 ` [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
@ 2020-04-28 12:06 ` Vignesh Raghavendra
2020-04-29 6:48 ` Tudor.Ambarus
1 sibling, 1 reply; 6+ messages in thread
From: Vignesh Raghavendra @ 2020-04-28 12:06 UTC (permalink / raw)
To: Tudor.Ambarus, sergei.shtylyov; +Cc: linux-mtd
On 21/04/20 12:01 pm, Tudor.Ambarus@microchip.com wrote:
> From: Tudor Ambarus <tudor.ambarus@microchip.com>
>
> spi_nor_ready() returns 1 if ready, 0 if not ready and -errono on errors.
s/-errono/-errno
With that:
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
> Do the same in all the spi_nor_*_ready() children.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/mtd/spi-nor/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index cc68ea84318e..9dcc53bda8b0 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value
2020-04-21 6:31 ` [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
@ 2020-04-28 12:21 ` Vignesh Raghavendra
2020-04-29 6:49 ` Tudor.Ambarus
0 siblings, 1 reply; 6+ messages in thread
From: Vignesh Raghavendra @ 2020-04-28 12:21 UTC (permalink / raw)
To: Tudor.Ambarus, sergei.shtylyov; +Cc: linux-mtd
On 21/04/20 12:01 pm, Tudor.Ambarus@microchip.com wrote:
> From: Tudor Ambarus <tudor.ambarus@microchip.com>
>
> The functions return 1 if ready, 0 if not ready, -errno on errors.
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/mtd/spi-nor/core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 9dcc53bda8b0..9611553e829f 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -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)
> {
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready()
2020-04-28 12:06 ` [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Vignesh Raghavendra
@ 2020-04-29 6:48 ` Tudor.Ambarus
0 siblings, 0 replies; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-29 6:48 UTC (permalink / raw)
To: linux-mtd; +Cc: vigneshr, sergei.shtylyov
On Tuesday, April 28, 2020 3:06:19 PM EEST Vignesh Raghavendra wrote:
> > From: Tudor Ambarus <tudor.ambarus@microchip.com>
> >
> > spi_nor_ready() returns 1 if ready, 0 if not ready and -errono on errors.
>
> s/-errono/-errno
>
> With that:
>
> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Fixed the typo and applied. Cheers.
>
> > Do the same in all the spi_nor_*_ready() children.
> >
> > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> > ---
> > drivers/mtd/spi-nor/core.c | 2 +-
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value
2020-04-28 12:21 ` Vignesh Raghavendra
@ 2020-04-29 6:49 ` Tudor.Ambarus
0 siblings, 0 replies; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-29 6:49 UTC (permalink / raw)
To: linux-mtd; +Cc: vigneshr, sergei.shtylyov
On Tuesday, April 28, 2020 3:21:53 PM EEST Vignesh Raghavendra wrote:
> On 21/04/20 12:01 pm, Tudor.Ambarus@microchip.com wrote:
> > From: Tudor Ambarus <tudor.ambarus@microchip.com>
> >
> > The functions return 1 if ready, 0 if not ready, -errno on errors.
>
> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
>
> > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> > ---
> > 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/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-29 6:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 6:31 [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Tudor.Ambarus
2020-04-21 6:31 ` [PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
2020-04-28 12:21 ` Vignesh Raghavendra
2020-04-29 6:49 ` Tudor.Ambarus
2020-04-28 12:06 ` [PATCH 1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() Vignesh Raghavendra
2020-04-29 6:48 ` Tudor.Ambarus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.