Skip to contentSkip to conversation

WARNING: Unnecessary parentheses - maybe == should be = ?

DISCUSSION Dan Carpenter 2 participants 5 messages Feb 10, 2014 – Feb 26, 2014

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 1 line · Dan Carpenter

These messages are terrifying...

Hey Dan.

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

Quoted 2 lines

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.

Quoted 2 lines

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.

Quoted 1 line

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.

Quoted 2 lines

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.

Quoted 2 lines

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

#2 lore raw
Quoted 12 lines · Joe Perches
Quoted 1 line · Dan Carpenter

These messages are terrifying...

Hey Dan.

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

Quoted 2 lines

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

#3 lore raw
Quoted 7 lines · Dan Carpenter
Quoted 4 lines · Joe Perches
Quoted 2 lines · Dan Carpenter

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?

#4 lore raw
Quoted 11 lines · Joe Perches
Quoted 7 lines · Dan Carpenter
Quoted 4 lines · Joe Perches
Quoted 2 lines · Dan Carpenter

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