Re: [PATCH] checkpatch: Check for illegal return codes

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 12:07 -0700, pher...@codeaurora.org wrote: > On 2018-07-03 11:19, Joe Perches wrote: > > On Tue, 2018-07-03 at 11:09 -0700, Prakruthi Deepak Heragu wrote: > > > The only legal integer return is 0, anything else > > > following "return" should be -ERRCODE or a function. > > >

Re: [PATCH] checkpatch: Check for illegal return codes

2018-07-03 Thread pheragu
On 2018-07-03 11:19, Joe Perches wrote: On Tue, 2018-07-03 at 11:09 -0700, Prakruthi Deepak Heragu wrote: The only legal integer return is 0, anything else following "return" should be -ERRCODE or a function. http://lkml.org/lkml/2010/7/23/318 There's lots of "return -1;" statements in this p

Re: [PATCH] checkpatch: Check for illegal return codes

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 11:09 -0700, Prakruthi Deepak Heragu wrote: > The only legal integer return is 0, anything else > following "return" should be -ERRCODE or a function. > > http://lkml.org/lkml/2010/7/23/318 > There's lots of "return -1;" statements in this patch - it's obscene > that this

[PATCH] checkpatch: Check for illegal return codes

2018-07-03 Thread Prakruthi Deepak Heragu
The only legal integer return is 0, anything else following "return" should be -ERRCODE or a function. http://lkml.org/lkml/2010/7/23/318 There's lots of "return -1;" statements in this patch - it's obscene that this is used to indicate "some error occurred" in kernel space rather than a rea