Re: [PATCH] staging: tidspbridge: make the MGR_ENUMNODE_INFO ioctl work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Felipe,

On Fri, 2010-10-22 at 16:36 +0300, Felipe Contreras wrote:
> On Fri, Oct 22, 2010 at 3:59 PM, Ionut Nicu <ionut.nicu@xxxxxxxxx> wrote:
> > The current code was always returning a non-zero status value
> > to userspace applications when this ioctl was called.
> >
> > The error code was ENODATA, which isn't actually an error,
> > it's always returned by dcd_enumerate_object() when it hits the
> > end of list.
> >
> > Reorganized the code so that it works like "dynreg.out -ln" from
> > the userspace-dspbridge package expects it to work.
> >
> > Signed-off-by: Ionut Nicu <ionut.nicu@xxxxxxxxxx>
> 
> I also found this issue, but I have simpler fix. I think my fix should
> be applied first, and then your reorganization.
> 

Yeah, mine looks more complex because of the code cleanup in
mgr_enum_node_info().

Anyway I don't have anything against applying your patch first. If your
patch gets merged, I'll rebase my changes and submit a new one with the
code cleanup.

> >From 16759e41adc11ad1f34b757dcf19fe55c84bcfc2 Mon Sep 17 00:00:00 2001
> From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> Date: Sun, 19 Sep 2010 14:52:42 +0300
> Subject: [PATCH] staging: tidspbridge: fix mgr_enum_node_info
> 
> It's always erroring out.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> ---
>  drivers/staging/tidspbridge/rmgr/mgr.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c
> b/drivers/staging/tidspbridge/rmgr/mgr.c
> index 57a39b9..4ba9517 100644
> --- a/drivers/staging/tidspbridge/rmgr/mgr.c
> +++ b/drivers/staging/tidspbridge/rmgr/mgr.c
> @@ -148,6 +148,11 @@ int mgr_enum_node_info(u32 node_id, struct
> dsp_ndbprops *pndb_props,
> 
>  		}
>  	}
> +
> +	/* the last status is not 0, but neither an error */
> +	if (status > 0)
> +		status = 0;
> +
>  	if (!status) {
>  		if (node_id > (node_index - 1)) {
>  			status = -EINVAL;
> 

Acked-by: Ionut Nicu <ionut.nicu@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux