public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH infiniband-diags] saquery.c: Return proper status from query_sa_cpi on bad result status
@ 2014-11-05 20:22 Hal Rosenstock
       [not found] ` <545A86ED.9060803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2014-11-05 20:22 UTC (permalink / raw)
  To: Ira Weiny
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Dan Ben-Yosef


When result status was other than IB_SA_MAD_STATUS_SUCCESS,
0 was being returned rather than EIO as intended.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/saquery.c b/src/saquery.c
index 0f39064..1af3401 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -1445,7 +1445,7 @@ static int query_sa_cpi(struct sa_handle *h, struct query_params *query_params)
 	memcpy(&query_params->cpi, cpi, sizeof(query_params->cpi));
 Exit:
 	sa_free_result_mad(&result);
-	return (0);
+	return ret;
 }
 
 static const struct query_cmd query_cmds[] = {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH infiniband-diags] saquery.c: Return proper status from query_sa_cpi on bad result status
       [not found] ` <545A86ED.9060803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2014-11-08 14:51   ` Weiny, Ira
  0 siblings, 0 replies; 2+ messages in thread
From: Weiny, Ira @ 2014-11-08 14:51 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Dan Ben-Yosef



> -----Original Message-----
> From: Hal Rosenstock [mailto:hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org]
> Sent: Wednesday, November 05, 2014 12:22 PM
> To: Weiny, Ira
> Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org); Dan Ben-Yosef
> Subject: [PATCH infiniband-diags] saquery.c: Return proper status from
> query_sa_cpi on bad result status
> 
> 
> When result status was other than IB_SA_MAD_STATUS_SUCCESS,
> 0 was being returned rather than EIO as intended.
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks applied,
Ira


> ---
> diff --git a/src/saquery.c b/src/saquery.c index 0f39064..1af3401 100644
> --- a/src/saquery.c
> +++ b/src/saquery.c
> @@ -1445,7 +1445,7 @@ static int query_sa_cpi(struct sa_handle *h, struct
> query_params *query_params)
>  	memcpy(&query_params->cpi, cpi, sizeof(query_params->cpi));
>  Exit:
>  	sa_free_result_mad(&result);
> -	return (0);
> +	return ret;
>  }
> 
>  static const struct query_cmd query_cmds[] = {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-11-08 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 20:22 [PATCH infiniband-diags] saquery.c: Return proper status from query_sa_cpi on bad result status Hal Rosenstock
     [not found] ` <545A86ED.9060803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-11-08 14:51   ` Weiny, Ira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox