From: Theodore Ts'o <tytso@mit.edu>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/3] ext4: Use kstrtoul() instead of deprecated simple_strtoul()
Date: Mon, 11 Mar 2013 11:38:01 -0400 [thread overview]
Message-ID: <20130311153801.GB4646@thunk.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1303110830260.24359@localhost>
On Mon, Mar 11, 2013 at 08:36:16AM +0100, Lukáš Czerner wrote:
> I think that parse_strtoul() is still useful to have because we
> check the "max" value as well and return -EINVAL if it is exceeded.
> Removing it we would have to add the check to the callers
> where we're using is now, which seems unnecessary, especially since
> we might expect more users of the helper.
Well, at the moment only one of the two users of parse_strtoul() is
using the "max" value check feature. I see one other potential user
of parse_strtoul (there's one use of simple_strtoul in get_sb_block()
which wasn't converted in your patch), but it wouldn't need the max
value check feature either.
So I don't have a super strong feeling about this, since this isn't
performance critical code, and it's probably not going to cost a large
amount of object code or stack space, but sometimes extra levels of
abstraction end up hurting more than they help.
Regards,
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-11 15:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 8:23 [PATCH 1/3] ext4: remove unused variable in ext4_free_blocks() Lukas Czerner
2013-03-08 8:23 ` [PATCH 2/3] ext4: Use kstrtoul() instead of deprecated simple_strtoul() Lukas Czerner
2013-03-11 2:26 ` Theodore Ts'o
2013-03-11 7:36 ` Lukáš Czerner
2013-03-11 15:38 ` Theodore Ts'o [this message]
2013-03-08 8:23 ` [PATCH 3/3] ext4: Do no use yield() in ext4 code Lukas Czerner
2013-03-11 2:41 ` Theodore Ts'o
2013-03-11 2:25 ` [PATCH 1/3] ext4: remove unused variable in ext4_free_blocks() Theodore Ts'o
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=20130311153801.GB4646@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@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.