From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: drv@mailo.com
Cc: broonie@kernel.org, kumarpraveen@linux.microsoft.com,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
ssengar@microsoft.com
Subject: Re: [PATCH] spi: Remove extra/duplicate constant from expression
Date: Sat, 11 Feb 2023 15:46:25 +0100 [thread overview]
Message-ID: <e8ce6ab5-5db0-305b-f025-a4cef95fde58@wanadoo.fr> (raw)
In-Reply-To: <Y+dnFKut9qiQUxjW@ubun2204.myguest.virtualbox.org>
Le 11/02/2023 à 10:59, Deepak R Varma a écrit :
> Constant SPI_TX_OCTAL is included twice while building the controller
> mode bits. Remove the extra constant.
> Issue identified using doublebitand.cocci Coccinelle semantic patch.
>
> Signed-off-by: Deepak R Varma <drv-asAA5fHt7EIAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/spi/spi-sn-f-ospi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c
> index 348c6e1edd38..19284d6914fc 100644
> --- a/drivers/spi/spi-sn-f-ospi.c
> +++ b/drivers/spi/spi-sn-f-ospi.c
> @@ -611,7 +611,7 @@ static int f_ospi_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL
> - | SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL
> + | SPI_RX_DUAL | SPI_RX_QUAD
Or maybe s/SPI_TX_OCTAL/SPI_RX_OCTAL/ ?
CJ
> | SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST;
> ctlr->mem_ops = &f_ospi_mem_ops;
> ctlr->bus_num = -1;
prev parent reply other threads:[~2023-02-11 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 9:59 [PATCH] spi: Remove extra/duplicate constant from expression Deepak R Varma
2023-02-11 14:46 ` Christophe JAILLET [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=e8ce6ab5-5db0-305b-f025-a4cef95fde58@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=broonie@kernel.org \
--cc=drv@mailo.com \
--cc=kumarpraveen@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ssengar@microsoft.com \
/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;
as well as URLs for NNTP newsgroup(s).