From: <Nicolas.Ferre@microchip.com>
To: <axel.lin@ingics.com>, <linux-kernel@vger.kernel.org>
Cc: <broonie@kernel.org>, <radu_nicolae.pirea@upb.ro>,
<lee.jones@linaro.org>, <linux-spi@vger.kernel.org>,
<Tudor.Ambarus@microchip.com>, <Cristian.Birsan@microchip.com>,
<alexandre.belloni@bootlin.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] spi: at91-usart: Remove duplicated checking for spi->bits_per_word
Date: Wed, 6 Mar 2019 10:57:45 +0000 [thread overview]
Message-ID: <5978e11c-9858-15c7-2821-73d09f5ffa38@microchip.com> (raw)
In-Reply-To: <20181002101010.29723-1-axel.lin@ingics.com>
On 02/10/2018 at 12:10, Axel Lin wrote:
> This checking is already done in __spi_validate_bits_per_word().
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Agreed:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
(Axel, sorry for the delay)
Best regards,
Nicolas
> ---
> drivers/spi/spi-at91-usart.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
> index a924657642fa..519853f14934 100644
> --- a/drivers/spi/spi-at91-usart.c
> +++ b/drivers/spi/spi-at91-usart.c
> @@ -176,12 +176,6 @@ static int at91_usart_spi_setup(struct spi_device *spi)
> struct at91_usart_spi *aus = spi_master_get_devdata(spi->controller);
> u32 *ausd = spi->controller_state;
> unsigned int mr = at91_usart_spi_readl(aus, MR);
> - u8 bits = spi->bits_per_word;
> -
> - if (bits != 8) {
> - dev_dbg(&spi->dev, "Only 8 bits per word are supported\n");
> - return -EINVAL;
> - }
>
> if (spi->mode & SPI_CPOL)
> mr |= US_MR_CPOL;
> @@ -210,7 +204,7 @@ static int at91_usart_spi_setup(struct spi_device *spi)
>
> dev_dbg(&spi->dev,
> "setup: bpw %u mode 0x%x -> mr %d %08x\n",
> - bits, spi->mode, spi->chip_select, mr);
> + spi->bits_per_word, spi->mode, spi->chip_select, mr);
>
> return 0;
> }
>
--
Nicolas Ferre
prev parent reply other threads:[~2019-03-06 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 10:10 Axel Lin
2019-03-06 10:57 ` Nicolas.Ferre [this message]
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=5978e11c-9858-15c7-2821-73d09f5ffa38@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=Cristian.Birsan@microchip.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=radu_nicolae.pirea@upb.ro \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®