Re: Typecasting a void pointer to unsigned long in zsmalloc.c

Alex Hogen <[email protected]> Thu, 23 Jan 2025 17:58:10 +0000
Newsgroups org.kernelnewbies.kernelnewbies
Message-ID <CH0PR16MB4497FDD0D1D422038CFB70A5D0E02@CH0PR16MB4497.namprd16.prod.outlook.com>
>> Shouldn't there be a special type for doing this type of conversion?

> That type is "unsigned long" :)

Wouldn't "uintptr_t" be a more explicit type for storing pointer addresses as integers? It seems to me it has the advantage of expressing intent better for us human readers. See <linux/types.h>. Yes, it is currently defined as an "unsigned long."
_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies