From: Rob Jones <rob.jones@codethink.co.uk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] fs: replace int param with size_t for seq_open_private()
Date: Mon, 01 Sep 2014 15:38:51 +0100 [thread overview]
Message-ID: <540484FB.1060906@codethink.co.uk> (raw)
In-Reply-To: <CACVxJT_nkS9evtCd5x6GH3Fiyg+hO+bJCzvz3pgdxsUj+fwQVw@mail.gmail.com>
On 01/09/14 15:13, Alexey Dobriyan wrote:
> 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.
Yet.
>
> Save REX prefix, keep length unsigned int!
I am happy to do this if the general opinion is that it is the right
thing but I would like more input first. Using size_t was suggested by
Andrew Morton which sounds to me like a heavy gun on the side of size_t.
>
> Alexey
>
>
--
Rob Jones
Codethink Ltd
mailto:rob.jones@codethink.co.uk
tel:+44 161 236 5575
next prev parent reply other threads:[~2014-09-01 14:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 13:43 [PATCH] fs: replace int param with size_t for seq_open_private() Alexey Dobriyan
2014-09-01 13:54 ` Rob Jones
2014-09-01 14:13 ` Alexey Dobriyan
2014-09-01 14:38 ` Rob Jones [this message]
2014-09-01 21:22 ` Al Viro
2014-09-02 8:29 ` Rob Jones
-- strict thread matches above, loose matches on Subject: below --
2014-09-01 13:17 Rob Jones
2014-09-01 15:36 ` Al Viro
2014-09-01 15:53 ` Rob Jones
2014-09-11 16:25 ` Rob Jones
2014-09-12 14:16 ` Richard Weinberger
2014-09-12 14:43 ` Rob Jones
2014-09-01 13:13 Rob Jones
2014-09-01 13:15 ` Rob Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=540484FB.1060906@codethink.co.uk \
--to=rob.jones@codethink.co.uk \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.