Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/13/2011 03:50 PM, Dan Magenheimer wrote:
>> From: Seth Jennings [mailto:sjenning@xxxxxxxxxxxxxxxxxx]
>> Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
>>
>> Hey Dan,
>>
>> I get the following compile warnings:
>>
>> mm/frontswap.c: In function 'init_frontswap':
>> mm/frontswap.c:264:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:266:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:268:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:270:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
> 
> Thanks for checking on 32-bit!
>  
>> size_t is platform dependent but is generally "unsigned int"
>> for 32-bit and "unsigned long" for 64-bit.
>>
>> I think just typecasting these to size_t * would fix it.
> 
> Actually, I think the best fix is likely to change the variables
> and the debugfs calls to u64 since even on 32-bit, the
> counters may exceed 2**32 on a heavily-loaded long-running
> system.
> 

That was going to be my other suggestion :)  I thought I'd suggest
the route that didn't involve you having to retype the counters.  But
the u64 solution is cleaner and, as Andrew pointed out, less risky.

> I'll give it a day or two to see if anyone else has any feedback
> before I fix this for V10.
> 
> Dan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]