linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Jones <rob.jones@codethink.co.uk>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@codethink.co.uk
Subject: Re: [PATCH] fs: replace int param with size_t for seq_open_private()
Date: Fri, 12 Sep 2014 15:43:33 +0100	[thread overview]
Message-ID: <54130695.1080707@codethink.co.uk> (raw)
In-Reply-To: <CAFLxGvwfydw-DFziNAmiEOH_X7+Axqj=zrCY0ZmLZdG9xq0X7w@mail.gmail.com>



On 12/09/14 15:16, Richard Weinberger wrote:
> On Thu, Sep 11, 2014 at 6:25 PM, Rob Jones <rob.jones@codethink.co.uk> wrote:
>>
>>
>> On 01/09/14 16:36, Al Viro wrote:
>>>
>>> On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote:
>>>
>>>>    void *__seq_open_private(struct file *f, const struct seq_operations
>>>> *ops,
>>>> -               int psize)
>>>> +               size_t psize)
>>>
>>>
>>> <sarcasm>
>>> It is a horrible limitation to impose, indeed.  Why, a lousy
>>> 2 gigabytes per line in procfs file - that's intolerable...
>>> </sarcasm>
>>>
>>>
>>
>> OK, I know this is a trivial patch but I've gone away and thought about
>> it and done some reading to see what the rest of the world thinks about
>> using size_t vs unsigned int (signed int is an abomination in this
>> context regardless).
>>
>> I think Al's sarcasm is misplaced.
>>
>> The correct type to use here *is* size_t. It's about consistency and,
>> more importantly, it's about not making assumptions about the hardware
>> architecture. It's included in the language for very good reasons and
>> it seems to me to be risky to ignore those reasons.
>
> Please don't forget to patch all for loops to use size_t instead of int too.
>

Yes, I'm sure we've all read that argument too. Now try behaving like a 
grown up.

-- 
Rob Jones
Codethink Ltd
mailto:rob.jones@codethink.co.uk
tel:+44 161 236 5575

  reply	other threads:[~2014-09-12 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 13:17 [PATCH] fs: replace int param with size_t for seq_open_private() 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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
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=54130695.1080707@codethink.co.uk \
    --to=rob.jones@codethink.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.weinberger@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).