2017-06-15 08:55:12

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH] staging: fsl-mc/dpio: Propagate error code

dpaa2_io_service_register() returns zero even if
qbman_swp_CDAN_set() encountered an error. Fix this
by propagating the error code so the caller is informed
data availability notifications are not properly set
for a channel.

Signed-off-by: Ioana Radulescu <[email protected]>
---
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
index e5d66749614c..762f045f53f7 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
@@ -260,9 +260,9 @@ int dpaa2_io_service_register(struct dpaa2_io *d,

/* Enable the generation of CDAN notifications */
if (ctx->is_cdan)
- qbman_swp_CDAN_set_context_enable(d->swp,
- (u16)ctx->id,
- ctx->qman64);
+ return qbman_swp_CDAN_set_context_enable(d->swp,
+ (u16)ctx->id,
+ ctx->qman64);
return 0;
}
EXPORT_SYMBOL(dpaa2_io_service_register);
--
2.11.0


2017-06-15 08:58:18

by Bogdan Purcareata

[permalink] [raw]
Subject: RE: [PATCH] staging: fsl-mc/dpio: Propagate error code

> -----Original Message-----
> From: Ioana Radulescu [mailto:[email protected]]
> Sent: Thursday, June 15, 2017 11:55 AM
> To: [email protected]
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Bogdan
> Purcareata <[email protected]>; [email protected]; Laurentiu Tudor
> <[email protected]>; Ruxandra Ioana Radulescu
> <[email protected]>; Roy Pledge <[email protected]>; Haiying Wang
> <[email protected]>
> Subject: [PATCH] staging: fsl-mc/dpio: Propagate error code
>
> dpaa2_io_service_register() returns zero even if
> qbman_swp_CDAN_set() encountered an error. Fix this
> by propagating the error code so the caller is informed
> data availability notifications are not properly set
> for a channel.
>
> Signed-off-by: Ioana Radulescu <[email protected]>

Acked-by: Bogdan Purcareata <[email protected]>

> ---
> drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
> b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
> index e5d66749614c..762f045f53f7 100644
> --- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
> +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
> @@ -260,9 +260,9 @@ int dpaa2_io_service_register(struct dpaa2_io *d,
>
> /* Enable the generation of CDAN notifications */
> if (ctx->is_cdan)
> - qbman_swp_CDAN_set_context_enable(d->swp,
> - (u16)ctx->id,
> - ctx->qman64);
> + return qbman_swp_CDAN_set_context_enable(d->swp,
> + (u16)ctx->id,
> + ctx->qman64);
> return 0;
> }
> EXPORT_SYMBOL(dpaa2_io_service_register);
> --
> 2.11.0