summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorWilliam Zhang <william.zhang@broadcom.com>2023-08-11 19:03:19 -0700
committerJagan Teki <jagan@edgeble.ai>2023-12-06 18:00:50 +0530
commit672c97b646106112df86b2848e874de5906a2d93 (patch)
tree39915d2e39bc2ebf8c41a29428fa653e6d11e876 /drivers/spi
parent2f0282922b2c458eea7f85c500a948a587437b63 (diff)
downloadu-boot-672c97b646106112df86b2848e874de5906a2d93.tar.gz
u-boot-672c97b646106112df86b2848e874de5906a2d93.tar.bz2
u-boot-672c97b646106112df86b2848e874de5906a2d93.zip
spi: bcm63xx-hsspi: Fix compiler warning
When build for arm64 target, comipler reports the following warning: drivers/spi/bcm63xx_hsspi.c: In function ‘bcm63xx_hsspi_xfer_dummy_cs’: include/linux/kernel.h:184:17: warning: comparison of distinct pointer types lacks a cast 184 | (void) (&_min1 == &_min2); \ | ^~ drivers/spi/bcm63xx_hsspi.c:298:22: note: in expansion of macro ‘min’ 298 | size_t curr_step = min(step_size, data_bytes); This change fix this warning by casting the data_bytes to size_t. Fixes: 0e144ec38cbb ("spi: bcm63xx-hsspi: Add prepend mode support") Signed-off-by: William Zhang <william.zhang@broadcom.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/bcm63xx_hsspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index a24bb430cb..19d9a5ae23 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -295,7 +295,7 @@ static int bcm63xx_hsspi_xfer_dummy_cs(struct udevice *dev, unsigned int data_by
/* transfer loop */
while (data_bytes > 0) {
- size_t curr_step = min(step_size, data_bytes);
+ size_t curr_step = min(step_size, (size_t)data_bytes);
int ret;
/* copy tx data */