* return codes
@ 2017-03-14 2:03 Tobin C. Harding
2017-03-14 2:08 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Tobin C. Harding @ 2017-03-14 2:03 UTC (permalink / raw)
To: kernelnewbies
On investigating call sites for 'return' in drivers/staging/ks7010/
it can be seen that a number of functions us *custom* (positive)
integers to indicate error. Notwithstanding that they are positive, is
this ok for code in the kernel (i.e in order to get out of staging
does this need to be changed)? Functions in question have internal linkage
and the error code is used for debug messages.
Should these be
A) left alone
B) made negative
C) changed to use standard error codes (i.e -ENOMEM etc)
thanks,
Tobin.
^ permalink raw reply [flat|nested] 3+ messages in thread
* return codes
2017-03-14 2:03 return codes Tobin C. Harding
@ 2017-03-14 2:08 ` Greg KH
2017-03-14 2:45 ` Tobin C. Harding
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2017-03-14 2:08 UTC (permalink / raw)
To: kernelnewbies
On Tue, Mar 14, 2017 at 01:03:07PM +1100, Tobin C. Harding wrote:
> On investigating call sites for 'return' in drivers/staging/ks7010/
> it can be seen that a number of functions us *custom* (positive)
> integers to indicate error. Notwithstanding that they are positive, is
> this ok for code in the kernel (i.e in order to get out of staging
> does this need to be changed)? Functions in question have internal linkage
> and the error code is used for debug messages.
>
> Should these be
>
> A) left alone
> B) made negative
> C) changed to use standard error codes (i.e -ENOMEM etc)
C) please
^ permalink raw reply [flat|nested] 3+ messages in thread
* return codes
2017-03-14 2:08 ` Greg KH
@ 2017-03-14 2:45 ` Tobin C. Harding
0 siblings, 0 replies; 3+ messages in thread
From: Tobin C. Harding @ 2017-03-14 2:45 UTC (permalink / raw)
To: kernelnewbies
On Tue, Mar 14, 2017 at 10:08:51AM +0800, Greg KH wrote:
> On Tue, Mar 14, 2017 at 01:03:07PM +1100, Tobin C. Harding wrote:
> > On investigating call sites for 'return' in drivers/staging/ks7010/
> > it can be seen that a number of functions us *custom* (positive)
> > integers to indicate error. Notwithstanding that they are positive, is
> > this ok for code in the kernel (i.e in order to get out of staging
> > does this need to be changed)? Functions in question have internal linkage
> > and the error code is used for debug messages.
> >
> > Should these be
> >
> > A) left alone
> > B) made negative
> > C) changed to use standard error codes (i.e -ENOMEM etc)
>
> C) please
Awesome.
thanks,
Tobin.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-14 2:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 2:03 return codes Tobin C. Harding
2017-03-14 2:08 ` Greg KH
2017-03-14 2:45 ` Tobin C. Harding
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).