xfs
[Top] [All Lists]

Re: [PATCH] xfs: stop using simple_strtoul()

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: [PATCH] xfs: stop using simple_strtoul()
From: Abhijit Pawar <abhi.c.pawar@xxxxxxxxx>
Date: Wed, 09 Jan 2013 19:38:46 +0530
Cc: Abhijit Pawar <abhi.c.pawar@xxxxxxxxx>, Ben Myers <bpm@xxxxxxx>, xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=vvFy8xKogUBsh5+J14+Mq+chEA4Ef/w1wKRSJE+ffiQ=; b=WGSTYRM4mowYa9S6xYauEiDZH6LEA/R+26Q4l54E1c8vF3xUTHSbYOt7/+ahrrQ2HI b4o+maeIxeDifqACgpqH2AaS+hRmPf/rQxApbPdv7qmgV3ECdvd1Y87G3PGsq3qt4wrK WHA2VcGPmcG/V0Zr+Gh45bAaNHnnryTulxO6vJvPLHxl3xRfXl0Nm2wW27EOfsVAinl4 0ALYTuY/h166WxKUyHh5oXfGC79jWPeeJex4Vq0L8tajqOw7+0PukOEbrUBJrlyE5RF7 eM5LIIPqKdc5GVQ44PWBQ+nh+OCjyPIaj6KBUUwTKhDrfS3BIMt78FTolM8B5ids5l7I kGdA==
In-reply-to: <50ECDC26.1030108@xxxxxxxxxx>
References: <50E8F470.5020305@xxxxxxxxxx> <20130107204957.GT27055@xxxxxxx> <50EBC8E5.9080200@xxxxxxxxxx> <50EC37FE.4010009@xxxxxxxxx> <50ECDC26.1030108@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
Hi Jeff, Ben,
On 01/09/2013 08:25 AM, Jeff Liu wrote:
> On 01/08/2013 11:15 PM, Abhijit Pawar wrote:
>> Hi Jeff,
>> On 01/08/2013 12:51 PM, Jeff Liu wrote:
>>> Hi Ben and Abhijit,
>>>
>>> On 01/08/2013 04:49 AM, Ben Myers wrote:
>>>> Hey Jeff & Abhijit,
>>>>
>>>> On Sun, Jan 06, 2013 at 11:50:08AM +0800, Jeff Liu wrote:
>>>>> This small patch convert xfs_parseargs() and suffix_strtoul() to
>>>>> use kstrtoint() instead of simple_strtoul() which is deprecated.
>>>>
>>>> It looks like Jeff's patch will conflict with a patch from Abhijit Pawar, 
>>>> 'fs:
>>>> remove obsolete simple_strto<foo>' which we saw Dec 7.  You guys went 
>>>> after the
>>>> same thing and came up with slightly differing results.  If Abhijit would
>>>> prefer to factor out the xfs changes I'd be happy to take either that, or
>>>> Jeff's patch, but it would be better if they didn't conflict.  Can y'all 
>>>> come
>>>> to an agreement as to what the xfs changes should be?
>>> Sorry, I missed that patch from Abhijit.
>>>
>>> Looks the previous patch did not replaced the simple_strtoul() with
>>> kstrtoint() in suffix_strtoul().
>>>
>>> Abhijit, would you like to fix it as well?
>> Yes,it did not replace the call. Looks like I have missed that piece of
>> code. Once Ben applies my original patch, I will send another patch for
>> this on top of that.
> Btw, on the original patch for XFS, you return a negative value per
> failure for all those changes in xfs_parseargs(),
> 
> +                     rc = kstrtoint(value, 10, &dswidth);
> +                     if (rc)
> +                             return -EINVAL;
> 
> However, it should be EINVAL because xfs_fs_fill_super() will end up
> convert it to be negative.
> 
> FYI, if we make it to "return EINVAL", checkpatch.pl will show warning
> message.  That's why I didn't check up if kstrtoint() failed or not at
> this stage on my post, but just proceed to...and those values will be
> verified at the end of xfs_parseargs().
I have posted the patch with addition of the above comments.  The email
subject says, "[PATCH 1/1] fs/xfs remove obsolete simple_strto<foo>".

> 
> 
> Thanks,
> -Jeff
> 


-- 
-
Abhijit

<Prev in Thread] Current Thread [Next in Thread>