* possible bug in linux-6.2/drivers/spi/spi-sn-f-ospi.c
@ 2023-02-20 17:05 David Binderman
0 siblings, 0 replies; only message in thread
From: David Binderman @ 2023-02-20 17:05 UTC (permalink / raw)
To: broonie, linux-spi, Linux Kernel Mailing List
Hello there,
Static analyser cppcheck says:
linux-6.2/drivers/spi/spi-sn-f-ospi.c:614:31: style: Same expression 'SPI_TX_OCTAL' found multiple times in chain of '|' operators. [duplicateExpression]
Source code is
ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL
| SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL
| SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST;
Maybe better code:
ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL
| SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL
| SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST;
Regards
David Binderman
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-20 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 17:05 possible bug in linux-6.2/drivers/spi/spi-sn-f-ospi.c David Binderman
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).