[PATCH] drivers: spi: Fix compiler warning

Jan Kiszka jan.kiszka at siemens.com
Mon Jan 11 14:27:57 CET 2021


From: Jan Kiszka <jan.kiszka at siemens.com>

Addresses "warning: cast from pointer to integer of different size".

Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
---
 kernel/drivers/spi/spi-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/drivers/spi/spi-master.c b/kernel/drivers/spi/spi-master.c
index 104af8023f..0fad328ef7 100644
--- a/kernel/drivers/spi/spi-master.c
+++ b/kernel/drivers/spi/spi-master.c
@@ -181,7 +181,7 @@ static int spi_master_ioctl_rt(struct rtdm_fd *fd,
 	case SPI_RTIOC_TRANSFER_N:
 		ret = -EINVAL;
 		if (master->ops->transfer_iobufs_n) {
-			len = (int)arg;
+			len = (long)arg;
 			rtdm_mutex_lock(&master->bus_lock);
 			ret = do_chip_select(slave);
 			if (ret == 0) {
-- 
2.26.2



More information about the Xenomai mailing list