Messages in this thread | | | Date | Mon, 1 Sep 2014 17:13:58 +0300 | Subject | Re: [PATCH] fs: replace int param with size_t for seq_open_private() | From | Alexey Dobriyan <> |
| |
On Mon, Sep 1, 2014 at 4:54 PM, Rob Jones <rob.jones@codethink.co.uk> wrote: > > > On 01/09/14 14:43, Alexey Dobriyan wrote: >>> >>> void *__seq_open_private(struct file *f, const struct seq_operations >>> *ops, >>> - int psize) >>> + size_t psize) >> >> >> It should be "unsigned int" at most. >> As almost all in-kernel lengths.
> I don't agree. Ultimately this parameter ends up as a parameter to > kmalloc where it is expected to be a size_t.
Which is a mistake too because allocations are never that large.
Save REX prefix, keep length unsigned int!
Alexey
| |