linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reminder to review a few patches sent two weeks ago
@ 2018-07-24 21:56 pheragu
  2018-07-25  0:33 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: pheragu @ 2018-07-24 21:56 UTC (permalink / raw)
  To: Apw, Joe; +Cc: Linux Kernel, Bryanh, Ckadabi, Tsoni

A reminder to review a few patches I had sent last week. Below are the 
links for the patches.

https://lkml.org/lkml/2018/7/5/798
http://lists-archives.com/linux-kernel/29168320-checkpatch-check-for-invalid-return-codes.html

- Prakruthi Deepak Heragu

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

* Re: Reminder to review a few patches sent two weeks ago
  2018-07-24 21:56 Reminder to review a few patches sent two weeks ago pheragu
@ 2018-07-25  0:33 ` Joe Perches
  2018-07-26  0:40   ` pheragu
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2018-07-25  0:33 UTC (permalink / raw)
  To: pheragu, Apw; +Cc: Linux Kernel, Bryanh, Ckadabi, Tsoni

On Tue, 2018-07-24 at 14:56 -0700, pheragu@codeaurora.org wrote:
> A reminder to review a few patches I had sent last week. Below are the 
> links for the patches.
> 
> https://lkml.org/lkml/2018/7/5/798

I have no fundamental object to this one, but
the 80 column use is unnecessary and should be
coalesced before it can be applied.

Perhaps:

# warn about #if 1
		if ($line =~ /^.\s*\#\s*if\s+1\b/) {
			WARN("IF_1",
			     "Consider removing the #if 1 and its #endif\n" .  $herecurr);
 		}
 
> http://lists-archives.com/linux-kernel/29168320-checkpatch-check-for-invalid-return-codes.html

This one has I think too many existing uses of
things like "return -1;"

$ git grep -P "return\s*\-\d+\s*;" | wc -l
9929

How many of these are actually appropriate?

Also, no space is required between return and -1
by c90 and this should use $Int so it should be:

	if ($line =~ /\breturn\s*\-\$Int\s*;/) {

etc...


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

* Re: Reminder to review a few patches sent two weeks ago
  2018-07-25  0:33 ` Joe Perches
@ 2018-07-26  0:40   ` pheragu
  0 siblings, 0 replies; 3+ messages in thread
From: pheragu @ 2018-07-26  0:40 UTC (permalink / raw)
  To: Joe Perches; +Cc: Apw, Linux Kernel, Bryanh, Ckadabi, Tsoni

On 2018-07-24 17:33, Joe Perches wrote:
> On Tue, 2018-07-24 at 14:56 -0700, pheragu@codeaurora.org wrote:
>> A reminder to review a few patches I had sent last week. Below are the
>> links for the patches.
>> 
>> https://lkml.org/lkml/2018/7/5/798
> 
> I have no fundamental object to this one, but
> the 80 column use is unnecessary and should be
> coalesced before it can be applied.
> 
> Perhaps:
> 
> # warn about #if 1
> 		if ($line =~ /^.\s*\#\s*if\s+1\b/) {
> 			WARN("IF_1",
> 			     "Consider removing the #if 1 and its #endif\n" .  $herecurr);
>  		}
> 
>> http://lists-archives.com/linux-kernel/29168320-checkpatch-check-for-invalid-return-codes.html
> 
> This one has I think too many existing uses of
> things like "return -1;"
> 
> $ git grep -P "return\s*\-\d+\s*;" | wc -l
> 9929
> 
> How many of these are actually appropriate?
> 
I did go through a few of the files which return -1 in their functions,
I observed that most of them were inappropriate and there was a case
where actually the use of return -1 was 
incorrect(kernel/arch/ia64/mm/contig.c
in the function find_bootmap_location()). We could actually catch such 
errors
from now on if we use this patch.

> Also, no space is required between return and -1
> by c90 and this should use $Int so it should be:
> 
> 	if ($line =~ /\breturn\s*\-\$Int\s*;/) {
> 
> etc...

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

end of thread, other threads:[~2018-07-26  0:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 21:56 Reminder to review a few patches sent two weeks ago pheragu
2018-07-25  0:33 ` Joe Perches
2018-07-26  0:40   ` pheragu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).