All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] goldfish: Return proper error code
@ 2016-02-17 17:23 Amitoj Kaur Chawla
  2016-02-17 18:41 ` One Thousand Gnomes
  0 siblings, 1 reply; 4+ messages in thread
From: Amitoj Kaur Chawla @ 2016-02-17 17:23 UTC (permalink / raw
  To: linux-kernel; +Cc: julia.lawall

This change has been made with the goal that kernel functions should
return something more descriptive than -1 on failure.

Change the return value on valid_batchbuffer_addr() failure from -1 
to -EINVAL.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/platform/goldfish/goldfish_pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 9f6734c..6de6fd2 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -233,7 +233,7 @@ static int setup_access_params_addr(struct platform_device *pdev,
 		dev->aps = aps;
 		return 0;
 	} else
-		return -1;
+		return -EINVAL;
 }
 
 /* A value that will not be set by qemu emulator */
-- 
1.9.1

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

* Re: [PATCH] goldfish: Return proper error code
  2016-02-17 17:23 [PATCH] goldfish: Return proper error code Amitoj Kaur Chawla
@ 2016-02-17 18:41 ` One Thousand Gnomes
  2016-02-17 19:20   ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: One Thousand Gnomes @ 2016-02-17 18:41 UTC (permalink / raw
  To: Amitoj Kaur Chawla; +Cc: linux-kernel, julia.lawall

On Wed, 17 Feb 2016 22:53:29 +0530
Amitoj Kaur Chawla <amitoj1606@gmail.com> wrote:

> This change has been made with the goal that kernel functions should
> return something more descriptive than -1 on failure.
> 
> Change the return value on valid_batchbuffer_addr() failure from -1 
> to -EINVAL.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

NAK. It's not user visible, it's a piece of code that has a pile of other
more important fixes needed first, and it's also as far as possible kept
aligned with the Android upstream.

If it were some random otherwise unchanging bit of code then it might
just about make sense but in this case no - especially when you only
change one of the two returns of -1 !

Alan

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

* Re: [PATCH] goldfish: Return proper error code
  2016-02-17 18:41 ` One Thousand Gnomes
@ 2016-02-17 19:20   ` Julia Lawall
  2016-02-17 19:27     ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-02-17 19:20 UTC (permalink / raw
  To: One Thousand Gnomes; +Cc: Amitoj Kaur Chawla, linux-kernel



On Wed, 17 Feb 2016, One Thousand Gnomes wrote:

> On Wed, 17 Feb 2016 22:53:29 +0530
> Amitoj Kaur Chawla <amitoj1606@gmail.com> wrote:
>
> > This change has been made with the goal that kernel functions should
> > return something more descriptive than -1 on failure.
> >
> > Change the return value on valid_batchbuffer_addr() failure from -1
> > to -EINVAL.
> >
> > Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
>
> NAK. It's not user visible, it's a piece of code that has a pile of other
> more important fixes needed first, and it's also as far as possible kept
> aligned with the Android upstream.
>
> If it were some random otherwise unchanging bit of code then it might
> just about make sense but in this case no - especially when you only
> change one of the two returns of -1 !

The other has been chahged already in a patch in the staging tree.  Maybe
it's not in linux-next yet?

julia

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

* Re: [PATCH] goldfish: Return proper error code
  2016-02-17 19:20   ` Julia Lawall
@ 2016-02-17 19:27     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-02-17 19:27 UTC (permalink / raw
  To: One Thousand Gnomes; +Cc: Amitoj Kaur Chawla, linux-kernel



On Wed, 17 Feb 2016, Julia Lawall wrote:

>
>
> On Wed, 17 Feb 2016, One Thousand Gnomes wrote:
>
> > On Wed, 17 Feb 2016 22:53:29 +0530
> > Amitoj Kaur Chawla <amitoj1606@gmail.com> wrote:
> >
> > > This change has been made with the goal that kernel functions should
> > > return something more descriptive than -1 on failure.
> > >
> > > Change the return value on valid_batchbuffer_addr() failure from -1
> > > to -EINVAL.
> > >
> > > Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> >
> > NAK. It's not user visible, it's a piece of code that has a pile of other
> > more important fixes needed first, and it's also as far as possible kept
> > aligned with the Android upstream.
> >
> > If it were some random otherwise unchanging bit of code then it might
> > just about make sense but in this case no - especially when you only
> > change one of the two returns of -1 !
>
> The other has been chahged already in a patch in the staging tree.  Maybe
> it's not in linux-next yet?

It's there too: 1d427da1d7f9f81c4f5439c9610683d3cb9c1921

julia

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

end of thread, other threads:[~2016-02-17 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 17:23 [PATCH] goldfish: Return proper error code Amitoj Kaur Chawla
2016-02-17 18:41 ` One Thousand Gnomes
2016-02-17 19:20   ` Julia Lawall
2016-02-17 19:27     ` Julia Lawall

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.