All of lore.kernel.org
 help / color / mirror / Atom feed
* WARNING: Unnecessary parentheses - maybe == should be = ?
@ 2014-02-10  9:27 Dan Carpenter
  2014-02-10 17:19 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-02-10  9:27 UTC (permalink / raw)
  To: Joe Perches, Andy Whitcroft; +Cc: linux-kernel

These messages are terrifying...  We do not want to encourage a million
first patch submitters to start introducing = vs == bugs.

Did you look through the warning messages this generates?  Was it ever
appropriate to change the == to =?

Please remove the second part of that message.

Also there needs to be a mailing list for checkpatch.pl.  LKML is a
write only archive, but it's not a discussion list.

Also the seq_puts() warning messages should be put under --strict
because we have to fight against people submitting those patches.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING: Unnecessary parentheses - maybe == should be = ?
  2014-02-10  9:27 WARNING: Unnecessary parentheses - maybe == should be = ? Dan Carpenter
@ 2014-02-10 17:19 ` Joe Perches
  2014-02-10 20:24   ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-02-10 17:19 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Andy Whitcroft, linux-kernel

On Mon, 2014-02-10 at 12:27 +0300, Dan Carpenter wrote:
> These messages are terrifying...

Hey Dan.

Do bumps in the night keep you up too? :)

> We do not want to encourage a million
> first patch submitters to start introducing = vs == bugs.

Definitely true and I didn't think of that.

> Did you look through the warning messages this generates?  Was it ever
> appropriate to change the == to =?

I didn't check.  My thought was that this was for
patches not files and the use of:

	if ((foo == bar))

in a patch was excessive parentheses.  The reason
to use the ((foo == bar)) form is when the intent
is to assign.

> Please remove the second part of that message.

Maybe emit it when what being scanned is a patch,
but not a file and only emit the excessive parens
when it's a file.

> Also there needs to be a mailing list for checkpatch.pl.  LKML is a
> write only archive, but it's not a discussion list.

<shrug>.

A mailing list just for checkpatch seems excessive.

Maybe a combined source tools mailing list for scripts/
would be better and maybe smatch should be there too.

> Also the seq_puts() warning messages should be put under --strict
> because we have to fight against people submitting those patches.

Another <shrug>.

I still kind of like the seq_printf macro hack.
http://lkml.org/lkml/2013/3/16/79



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING: Unnecessary parentheses - maybe == should be = ?
  2014-02-10 17:19 ` Joe Perches
@ 2014-02-10 20:24   ` Dan Carpenter
  2014-02-10 21:59     ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-02-10 20:24 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, linux-kernel

On Mon, Feb 10, 2014 at 09:19:46AM -0800, Joe Perches wrote:
> On Mon, 2014-02-10 at 12:27 +0300, Dan Carpenter wrote:
> > These messages are terrifying...
> 
> Hey Dan.
> 
> Do bumps in the night keep you up too? :)
> 
> > We do not want to encourage a million
> > first patch submitters to start introducing = vs == bugs.
> 
> Definitely true and I didn't think of that.
> 

So long as we can re-phrase it then I don't have a problem with the
warning.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING: Unnecessary parentheses - maybe == should be = ?
  2014-02-10 20:24   ` Dan Carpenter
@ 2014-02-10 21:59     ` Joe Perches
  2014-02-26  9:29       ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-02-10 21:59 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Andy Whitcroft, linux-kernel

On Mon, 2014-02-10 at 23:24 +0300, Dan Carpenter wrote:
> On Mon, Feb 10, 2014 at 09:19:46AM -0800, Joe Perches wrote:
> > On Mon, 2014-02-10 at 12:27 +0300, Dan Carpenter wrote:
> > > We do not want to encourage a million
> > > first patch submitters to start introducing = vs == bugs.
> > Definitely true and I didn't think of that.
> So long as we can re-phrase it then I don't have a problem with the
> warning.

Do you have a suggested phrasing?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING: Unnecessary parentheses - maybe == should be = ?
  2014-02-10 21:59     ` Joe Perches
@ 2014-02-26  9:29       ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-02-26  9:29 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, linux-kernel

On Mon, Feb 10, 2014 at 01:59:56PM -0800, Joe Perches wrote:
> On Mon, 2014-02-10 at 23:24 +0300, Dan Carpenter wrote:
> > On Mon, Feb 10, 2014 at 09:19:46AM -0800, Joe Perches wrote:
> > > On Mon, 2014-02-10 at 12:27 +0300, Dan Carpenter wrote:
> > > > We do not want to encourage a million
> > > > first patch submitters to start introducing = vs == bugs.
> > > Definitely true and I didn't think of that.
> > So long as we can re-phrase it then I don't have a problem with the
> > warning.
> 
> Do you have a suggested phrasing?
> 

Unnecessary parentheses - this is C not LISP dummy.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-26  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10  9:27 WARNING: Unnecessary parentheses - maybe == should be = ? Dan Carpenter
2014-02-10 17:19 ` Joe Perches
2014-02-10 20:24   ` Dan Carpenter
2014-02-10 21:59     ` Joe Perches
2014-02-26  9:29       ` Dan Carpenter

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.