possible bug in linux-6.2/drivers/spi/spi-sn-f-ospi.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux