Re: [PATCH v2] procfs: fix numbering in /proc/locks

From: AmÃrico Wang
Date: Wed Oct 06 2010 - 06:32:30 EST


On Tue, Oct 05, 2010 at 02:14:11PM +0200, Jerome Marchand wrote:
>On 09/30/2010 02:38 PM, Jerome Marchand wrote:
...
>> - f->private = (void *)1;
>> + f->private = (void *) (*pos + 1);
>
>That cast trigger a warning on some arch:
>"warning: cast to pointer from integer of different size"
>
>There is no real risk here. At worst /proc/locks will show wrong number
>if there is more than 2^32 locks, but should I mute the warning it with
>something like:
> f->private = (void *) (size_t) (*pos + 1);
>?

Or maybe cast to (void *) (unsigned long)?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/