[PATCH v2 2/2] staging: lustre: Cleanup cfs_str2mask in libcfs_string.c

Matthew Tyler matt.tyler at flashics.com
Mon Dec 15 14:27:00 UTC 2014


Cheers. I was checking with --terse and that warning was not showing.
I'll just fix that up now.

Thanks for your help! New to this...
Matthew Tyler

Mob: +61407964325
Site: http://matthewtyler.io/



On Mon, Dec 15, 2014 at 10:13 PM, Dan Carpenter
<dan.carpenter at oracle.com> wrote:
> On Mon, Dec 15, 2014 at 10:05:34PM +0800, Matthew Tyler wrote:
>>               /* find token length */
>> -             for (len = 0; str[len] != 0 && !isspace(str[len]) &&
>> -                   str[len] != '+' && str[len] != '-'; len++);
>> +             len = 0;
>> +             while (str[len] != '\0' && !isspace(str[len]) &&
>> +                     str[len] != '+' && str[len] != '-')
>
> This isn't aligned correctly.  I think checkpatch.pl --strict will warn
> here.  It should be:
>
>                 while (str[len] != '\0' && !isspace(str[len]) &&
>                        str[len] != '+' && str[len] != '-')
>
> [tab][tab][space][space][space][space][space][space][space]str[len] ...
>
> Otherwise, it looks good.
>
> regards,
> dan carpenter
>
>


More information about the devel mailing list