All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven
	<geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] spi: rspi: Use DUMMY_DATA macro instead of hardcoded value
Date: Fri, 27 Dec 2013 14:36:12 +0000	[thread overview]
Message-ID: <51418828.lCh7RnWjxA@avalon> (raw)
In-Reply-To: <1387878574-21445-5-git-send-email-geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>

Hi Geert,

Thank you for the patch.

On Tuesday 24 December 2013 10:49:33 Geert Uytterhoeven wrote:
> Make it more obvious that this value is dummy data.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> ---
>  drivers/spi/spi-rspi.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
> index 4e376db1ca4f..51fe3bdacb18 100644
> --- a/drivers/spi/spi-rspi.c
> +++ b/drivers/spi/spi-rspi.c
> @@ -149,6 +149,8 @@
>  #define SPBFCR_TXRST		0x80	/* qspi only */
>  #define SPBFCR_RXRST		0x40	/* qspi only */
> 
> +#define DUMMY_DATA		0x00
> +
>  struct rspi_data {
>  	void __iomem *addr;
>  	u32 max_speed_hz;
> @@ -541,7 +543,7 @@ static int rspi_receive_pio(struct rspi_data *rspi,
> struct spi_message *mesg, return -ETIMEDOUT;
>  		}
>  		/* dummy write for generate clock */
> -		rspi_write16(rspi, 0x00, RSPI_SPDR);
> +		rspi_write16(rspi, DUMMY_DATA, RSPI_SPDR);

Doesn't the comment make it obvious already ?

>  		if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
>  			dev_err(&rspi->master->dev,
> @@ -586,7 +588,7 @@ static int qspi_receive_pio(struct rspi_data *rspi,
> struct spi_message *mesg, return -ETIMEDOUT;
>  		}
>  		/* dummy write for generate clock */
> -		rspi_write8(rspi, 0x00, RSPI_SPDR);
> +		rspi_write8(rspi, DUMMY_DATA, RSPI_SPDR);
> 
>  		if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
>  			dev_err(&rspi->master->dev,
-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Geert Uytterhoeven
	<geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] spi: rspi: Use DUMMY_DATA macro instead of hardcoded value
Date: Fri, 27 Dec 2013 15:36:12 +0100	[thread overview]
Message-ID: <51418828.lCh7RnWjxA@avalon> (raw)
In-Reply-To: <1387878574-21445-5-git-send-email-geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>

Hi Geert,

Thank you for the patch.

On Tuesday 24 December 2013 10:49:33 Geert Uytterhoeven wrote:
> Make it more obvious that this value is dummy data.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  drivers/spi/spi-rspi.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
> index 4e376db1ca4f..51fe3bdacb18 100644
> --- a/drivers/spi/spi-rspi.c
> +++ b/drivers/spi/spi-rspi.c
> @@ -149,6 +149,8 @@
>  #define SPBFCR_TXRST		0x80	/* qspi only */
>  #define SPBFCR_RXRST		0x40	/* qspi only */
> 
> +#define DUMMY_DATA		0x00
> +
>  struct rspi_data {
>  	void __iomem *addr;
>  	u32 max_speed_hz;
> @@ -541,7 +543,7 @@ static int rspi_receive_pio(struct rspi_data *rspi,
> struct spi_message *mesg, return -ETIMEDOUT;
>  		}
>  		/* dummy write for generate clock */
> -		rspi_write16(rspi, 0x00, RSPI_SPDR);
> +		rspi_write16(rspi, DUMMY_DATA, RSPI_SPDR);

Doesn't the comment make it obvious already ?

>  		if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
>  			dev_err(&rspi->master->dev,
> @@ -586,7 +588,7 @@ static int qspi_receive_pio(struct rspi_data *rspi,
> struct spi_message *mesg, return -ETIMEDOUT;
>  		}
>  		/* dummy write for generate clock */
> -		rspi_write8(rspi, 0x00, RSPI_SPDR);
> +		rspi_write8(rspi, DUMMY_DATA, RSPI_SPDR);
> 
>  		if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
>  			dev_err(&rspi->master->dev,
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-12-27 14:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-24  9:49 [PATCH 0/5] spi: rspi: cleanups Geert Uytterhoeven
2013-12-24  9:49 ` Geert Uytterhoeven
2013-12-24  9:49 ` [PATCH 3/5] spi: rspi: Make more pointers const Geert Uytterhoeven
2013-12-24  9:49   ` Geert Uytterhoeven
     [not found] ` <1387878574-21445-1-git-send-email-geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2013-12-24  9:49   ` [PATCH 1/5] spi: rspi: Use dev_get_platdata() instead of raw dev.platform_data access Geert Uytterhoeven
2013-12-24  9:49     ` Geert Uytterhoeven
2013-12-24  9:49   ` [PATCH 2/5] spi: rspi: Remove casts Geert Uytterhoeven
2013-12-24  9:49     ` Geert Uytterhoeven
2013-12-27 14:33     ` Laurent Pinchart
2013-12-27 14:33       ` Laurent Pinchart
2013-12-27 18:38       ` Geert Uytterhoeven
2013-12-27 18:38         ` Geert Uytterhoeven
     [not found]         ` <CAMuHMdXyeRdgFJF0MzJkJ5jf1pSWfO98mdn-JSF0ze2iuTbLug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-28 11:44           ` Laurent Pinchart
2013-12-28 11:44             ` Laurent Pinchart
2013-12-24  9:49   ` [PATCH 4/5] spi: rspi: Use DUMMY_DATA macro instead of hardcoded value Geert Uytterhoeven
2013-12-24  9:49     ` Geert Uytterhoeven
     [not found]     ` <1387878574-21445-5-git-send-email-geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2013-12-27 14:36       ` Laurent Pinchart [this message]
2013-12-27 14:36         ` Laurent Pinchart
2013-12-30 11:54         ` Mark Brown
2013-12-24  9:49   ` [PATCH 5/5] spi: rspi: Use u8 for 8-bit register values Geert Uytterhoeven
2013-12-24  9:49     ` Geert Uytterhoeven
2013-12-24 13:20   ` [PATCH 0/5] spi: rspi: cleanups Mark Brown
2013-12-24 13:20     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51418828.lCh7RnWjxA@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.