All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target: xen-scsiback: Return proper -Exx instead of -1.
@ 2015-11-25 19:24 Konrad Rzeszutek Wilk
  2015-11-26  6:36 ` Juergen Gross
  2015-11-26  6:36 ` Juergen Gross
  0 siblings, 2 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-11-25 19:24 UTC (permalink / raw)
  To: linux-kernel, jgross, xen-devel; +Cc: Konrad Rzeszutek Wilk

We could return EINVAL but EBUSY (or EALREADY?)is more appropiate.

CC: jgross@suse.com
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 drivers/xen/xen-scsiback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 43bcae8..286e3da 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -800,7 +800,7 @@ static int scsiback_init_sring(struct vscsibk_info *info, grant_ref_t ring_ref,
 	int err;
 
 	if (info->irq)
-		return -1;
+		return -EBUSY;
 
 	err = xenbus_map_ring_valloc(info->dev, &ring_ref, 1, &area);
 	if (err)
-- 
2.5.0


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

* [PATCH] target: xen-scsiback: Return proper -Exx instead of -1.
@ 2015-11-25 19:24 Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-11-25 19:24 UTC (permalink / raw)
  To: linux-kernel, jgross, xen-devel; +Cc: Konrad Rzeszutek Wilk

We could return EINVAL but EBUSY (or EALREADY?)is more appropiate.

CC: jgross@suse.com
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 drivers/xen/xen-scsiback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 43bcae8..286e3da 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -800,7 +800,7 @@ static int scsiback_init_sring(struct vscsibk_info *info, grant_ref_t ring_ref,
 	int err;
 
 	if (info->irq)
-		return -1;
+		return -EBUSY;
 
 	err = xenbus_map_ring_valloc(info->dev, &ring_ref, 1, &area);
 	if (err)
-- 
2.5.0

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

* Re: [PATCH] target: xen-scsiback: Return proper -Exx instead of -1.
  2015-11-25 19:24 [PATCH] target: xen-scsiback: Return proper -Exx instead of -1 Konrad Rzeszutek Wilk
@ 2015-11-26  6:36 ` Juergen Gross
  2015-11-26  6:36 ` Juergen Gross
  1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2015-11-26  6:36 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, linux-kernel, xen-devel

On 25/11/15 20:24, Konrad Rzeszutek Wilk wrote:
> We could return EINVAL but EBUSY (or EALREADY?)is more appropiate.
> 
> CC: jgross@suse.com
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

While it doesn't really matter it's cleaner.

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  drivers/xen/xen-scsiback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
> index 43bcae8..286e3da 100644
> --- a/drivers/xen/xen-scsiback.c
> +++ b/drivers/xen/xen-scsiback.c
> @@ -800,7 +800,7 @@ static int scsiback_init_sring(struct vscsibk_info *info, grant_ref_t ring_ref,
>  	int err;
>  
>  	if (info->irq)
> -		return -1;
> +		return -EBUSY;
>  
>  	err = xenbus_map_ring_valloc(info->dev, &ring_ref, 1, &area);
>  	if (err)
> 


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

* Re: [PATCH] target: xen-scsiback: Return proper -Exx instead of -1.
  2015-11-25 19:24 [PATCH] target: xen-scsiback: Return proper -Exx instead of -1 Konrad Rzeszutek Wilk
  2015-11-26  6:36 ` Juergen Gross
@ 2015-11-26  6:36 ` Juergen Gross
  1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2015-11-26  6:36 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, linux-kernel, xen-devel

On 25/11/15 20:24, Konrad Rzeszutek Wilk wrote:
> We could return EINVAL but EBUSY (or EALREADY?)is more appropiate.
> 
> CC: jgross@suse.com
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

While it doesn't really matter it's cleaner.

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  drivers/xen/xen-scsiback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
> index 43bcae8..286e3da 100644
> --- a/drivers/xen/xen-scsiback.c
> +++ b/drivers/xen/xen-scsiback.c
> @@ -800,7 +800,7 @@ static int scsiback_init_sring(struct vscsibk_info *info, grant_ref_t ring_ref,
>  	int err;
>  
>  	if (info->irq)
> -		return -1;
> +		return -EBUSY;
>  
>  	err = xenbus_map_ring_valloc(info->dev, &ring_ref, 1, &area);
>  	if (err)
> 

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

end of thread, other threads:[~2015-11-26  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 19:24 [PATCH] target: xen-scsiback: Return proper -Exx instead of -1 Konrad Rzeszutek Wilk
2015-11-26  6:36 ` Juergen Gross
2015-11-26  6:36 ` Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2015-11-25 19:24 Konrad Rzeszutek Wilk

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.