2022-04-27 00:04:32

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool()

On Tue, Apr 26, 2022 at 11:32:02PM +0530, Jagdish Gediya wrote:
> Signed-off-by: Jagdish Gediya <[email protected]>
> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>

HEY! You still have the buggy IFF -> IF change. FIX IT.
My R-b was very clearly conditional on you fixing it.

> - * This routine returns 0 iff the first character is one of 'Yy1Nn0', or
> + * This routine returns 0 if the first character is one of 'YyTt1NnFf0', or


2022-04-27 11:20:18

by David Laight

[permalink] [raw]
Subject: RE: [PATCH v3 1/2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool()

From: Matthew Wilcox
> Sent: 26 April 2022 20:15
()
>
> On Tue, Apr 26, 2022 at 11:32:02PM +0530, Jagdish Gediya wrote:
> > Signed-off-by: Jagdish Gediya <[email protected]>
> > Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
>
> HEY! You still have the buggy IFF -> IF change. FIX IT.
> My R-b was very clearly conditional on you fixing it.
>
> > - * This routine returns 0 iff the first character is one of 'Yy1Nn0', or
> > + * This routine returns 0 if the first character is one of 'YyTt1NnFf0', or

my 2c

Iff doesn't really go with an 'or' clause.
(With a maths degree I know what it means!)

so it probably reads better as 'if'.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

2022-04-27 11:40:55

by Jagdish Gediya

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool()

On Tue, Apr 26, 2022 at 08:14:48PM +0100, Matthew Wilcox wrote:
> On Tue, Apr 26, 2022 at 11:32:02PM +0530, Jagdish Gediya wrote:
> > Signed-off-by: Jagdish Gediya <[email protected]>
> > Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
>
> HEY! You still have the buggy IFF -> IF change. FIX IT.
> My R-b was very clearly conditional on you fixing it.

My bad, I forgot to correct it. Andrew has corrected it.

> > - * This routine returns 0 iff the first character is one of 'Yy1Nn0', or
> > + * This routine returns 0 if the first character is one of 'YyTt1NnFf0', or