* [PATCH] spi: Remove extra/duplicate constant from expression
@ 2023-02-11 9:59 Deepak R Varma
2023-02-11 14:46 ` Christophe JAILLET
0 siblings, 1 reply; 2+ messages in thread
From: Deepak R Varma @ 2023-02-11 9:59 UTC (permalink / raw)
To: Mark Brown, linux-spi, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar, Deepak R Varma
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@mailo.com>
---
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
| SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST;
ctlr->mem_ops = &f_ospi_mem_ops;
ctlr->bus_num = -1;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: Remove extra/duplicate constant from expression
2023-02-11 9:59 [PATCH] spi: Remove extra/duplicate constant from expression Deepak R Varma
@ 2023-02-11 14:46 ` Christophe JAILLET
0 siblings, 0 replies; 2+ messages in thread
From: Christophe JAILLET @ 2023-02-11 14:46 UTC (permalink / raw)
To: drv; +Cc: broonie, kumarpraveen, linux-kernel, linux-spi, ssengar
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-11 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11 9:59 [PATCH] spi: Remove extra/duplicate constant from expression Deepak R Varma
2023-02-11 14:46 ` Christophe JAILLET
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.