spi: bcm63xx-hsspi: bcmbca-hsspi: fix _be16 type usage
authorWilliam Zhang <william.zhang@broadcom.com>
Sat, 11 Feb 2023 03:27:59 +0000 (19:27 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Feb 2023 12:45:01 +0000 (12:45 +0000)
commit2cca486cad4bf51da57cdad150697476a702ab69
treec4104b5ec264b8eb96975d487cc4a88f5d5773cf
parent80323599e33f9c19287a1a3707481fb157b27052
spi: bcm63xx-hsspi: bcmbca-hsspi: fix _be16 type usage

sparse tool report warnings: drivers/spi/spi-bcm63xx-hsspi.c:197:31:
sparse: sparse: cast from restricted __be16.

The controller requires big endian 16 bit data. Define an intermediate
u16 value and use __be16 piointer dereferncing for the data to avoid
directly casting to u16 and sparse warning.

Fixes: 85a84a616999 ("spi: bcm63xx-hsspi: Endianness fix for ARM based SoC")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302110438.sQwQnU54-lkp@intel.com/
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20230211032759.72967-1-william.zhang@broadcom.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm63xx-hsspi.c
drivers/spi/spi-bcmbca-hsspi.c