On 31/10/2023 17:20, Akram Ahmad wrote:
-#define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr +#define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (uintptr_t)(unsigned long) ptr
The problem remains the same in purecap if we do this: unsigned long will truncate the pointer. The point of using uintptr_t is that it is the same size as pointers, so there is no need for the intermediate cast - we can cast to uintptr_t directly. In 32-bit, there will then be an implicit conversion from 32-bit integer to 64-bit integer, but that's not a problem.
I've got no other comment so I can make this change directly before merging, if that's fine with you.
Kevin