All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak:  EPERM -> EINVAL
@ 2006-02-25 12:30 walter harms
  2006-02-25 12:41 ` Tim Cooijmans
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: walter harms @ 2006-02-25 12:30 UTC (permalink / raw)
  To: kernel-janitors

Hi list,
it was noticed that some driver return EPERM instead of EINVAL.
EPERM indicates no enought privilege to access a function.
This will fixit an return (i hope) a 'better' error msg.

re,
  walter


Signed-off-by: walter harms <wharms@bfs.de>

--- linux-2.6.15.4/drivers/i2c/i2c-core.c.bak	2006-02-25 
13:25:48.000000000 +0100
+++ linux-2.6.15.4/drivers/i2c/i2c-core.c	2006-02-25 13:24:44.000000000 
+0100
@@ -522,7 +522,7 @@
  		else {
  			pr_debug("i2c-core: %s used one too many times\n",
  				__FUNCTION__);
-			return -EPERM;
+			return -EINVAL;
  		}
  	}
  	
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak:  EPERM -> EINVAL
  2006-02-25 12:30 [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak: EPERM -> EINVAL walter harms
@ 2006-02-25 12:41 ` Tim Cooijmans
  2006-02-25 13:06 ` walter harms
  2006-02-25 13:50 ` Tim Cooijmans
  2 siblings, 0 replies; 4+ messages in thread
From: Tim Cooijmans @ 2006-02-25 12:41 UTC (permalink / raw)
  To: kernel-janitors

On Saturday 25 February 2006 13:30, walter harms wrote:
>   			pr_debug("i2c-core: %s used one too many times\n",
>   				__FUNCTION__);
> -			return -EPERM;
> +			return -EINVAL;
I think EBUSY would be more apprioriate here.  I'm not sure, though.  
include/asm-generic/errno-base.h has a short description for each errno.

Tim
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak:  EPERM -> EINVAL
  2006-02-25 12:30 [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak: EPERM -> EINVAL walter harms
  2006-02-25 12:41 ` Tim Cooijmans
@ 2006-02-25 13:06 ` walter harms
  2006-02-25 13:50 ` Tim Cooijmans
  2 siblings, 0 replies; 4+ messages in thread
From: walter harms @ 2006-02-25 13:06 UTC (permalink / raw)
  To: kernel-janitors

hi all,
imho EBUSY would indicate someone else is using it. But < 0 should never 
happen (integer overflow ?). even BUG() would be ok but the author 
decided otherwise and i do not what to change that.

re,
  walter

tim: do you know this ?
http://dev1.boomersdomain.com/cgi-bin/store_pedalinghistory_2/01068.html


Tim Cooijmans wrote:
> On Saturday 25 February 2006 13:30, walter harms wrote:
>>   			pr_debug("i2c-core: %s used one too many times\n",
>>   				__FUNCTION__);
>> -			return -EPERM;
>> +			return -EINVAL;
> I think EBUSY would be more apprioriate here.  I'm not sure, though.  
> include/asm-generic/errno-base.h has a short description for each errno.
> 
> Tim
> 
> 
> 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak:  EPERM -> EINVAL
  2006-02-25 12:30 [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak: EPERM -> EINVAL walter harms
  2006-02-25 12:41 ` Tim Cooijmans
  2006-02-25 13:06 ` walter harms
@ 2006-02-25 13:50 ` Tim Cooijmans
  2 siblings, 0 replies; 4+ messages in thread
From: Tim Cooijmans @ 2006-02-25 13:50 UTC (permalink / raw)
  To: kernel-janitors

On Saturday 25 February 2006 14:06, walter harms wrote:
> hi all,
> imho EBUSY would indicate someone else is using it. But < 0 should never
> happen (integer overflow ?). even BUG() would be ok but the author
> decided otherwise and i do not what to change that.
Oh wait, I thought the function would try to set something up and fail at 
that.  Didn't see it was only trying to release stuff.

> tim: do you know this ?
> http://dev1.boomersdomain.com/cgi-bin/store_pedalinghistory_2/01068.html
Hahahaha, yes, that does look familiar.

Tim
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2006-02-25 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-25 12:30 [KJ] linux-2.6.15.4/drivers/i2c/i2c-core.c.bak: EPERM -> EINVAL walter harms
2006-02-25 12:41 ` Tim Cooijmans
2006-02-25 13:06 ` walter harms
2006-02-25 13:50 ` Tim Cooijmans

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.