Message ID | 20200421063129.244466-2-tudor.ambarus@microchip.com |
---|---|
State | Accepted |
Delegated to: | Ambarus Tudor |
Headers | show |
Series | [1/2] mtd: spi-nor: Uniformize the return value in spi_nor_*_ready() | expand |
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) > { >
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
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) {