Skip to contentSkip to conversation

mtd: unittests: Use proper unsigned long type for ioctl requests

PATCH Applied Balint Reczey 2 participants 2 messages Feb 7, 2018 – Feb 14, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mtd: unittests: Use proper unsigned long type for ioctl requests

This fixes tests on s390x

---
 tests/unittests/test_lib.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/unittests/test_lib.h +3 -3
index 122672b..f5f0f34 100644
@@ -40,7 +40,7 @@ int __wrap_close(int fd)
 	return retval;
 }
 
-int __wrap_ioctl(int fd, int req, ...)
+int __wrap_ioctl(int fd, unsigned long req, ...)
 {
 	assert_true(fd > 0);
 	check_expected(req);
@@ -108,14 +108,14 @@ off_t __wrap_lseek(int fd, off_t seek, int whence)
 	} while(0);
 
 #define expect_ioctl(W,X,Y,Z) do { \
-		expect_value(__wrap_ioctl, req, (int)W);\
+		expect_value(__wrap_ioctl, req, W);\
 		will_return(__wrap_ioctl, X);\
 		will_return(__wrap_ioctl, Y);\
 		will_return(__wrap_ioctl, Z);\
 	} while(0);
 
 #define expect_ioctl_short(X,Y) do { \
-		expect_value(__wrap_ioctl, req, (int)X);\
+		expect_value(__wrap_ioctl, req, X);\
 		will_return(__wrap_ioctl, Y);\
 		will_return(__wrap_ioctl, NULL);\
 		will_return(__wrap_ioctl, 0);\
Signature · 1 line
2.14.1