Re: [PATCH 1/2] staging: tidspbridge: rmgr/node.c code cleanup

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

 



Hi Ionut,

On Thu, Dec 9, 2010 at 4:22 PM, Ionut Nicu <ionut.nicu@xxxxxxxxxx> wrote:
> Hi Omar,
>
> On Thu, 2010-12-09 at 23:47 +0200, Ionut Nicu wrote:
>> Reorganized some code in rmgr/node.c to increase its
>> readability. Most of the changes reduce the code
>> indentation level and simplifiy the code. No functional
>> changes were done.
>
> <snip>
>
>>       /*
>>        * Check stream mode. Default is STRMMODE_PROCCOPY.
>>        */
>> -     if (!status && pattrs) {
>> -             if (pattrs->strm_mode != STRMMODE_PROCCOPY)
>> -                     status = -EPERM;        /* illegal stream mode */
>> -
>> -     }
>> -     if (status)
>> -             goto func_end;
>> +     if (pattrs && pattrs->strm_mode != STRMMODE_PROCCOPY)
>> +             return -EPERM;  /* illegal stream mode */
>>
>
> While cleaning up and reviewing the code I saw this check,  which unless
> it's intentional I think it looks like a bug. See comment below.
>
> <snip>
>> +             strm_mode = pattrs ? pattrs->strm_mode : STRMMODE_PROCCOPY;
>> +             switch (strm_mode) {
>> +             case STRMMODE_RDMA:
>
> ...
>
>> +
>> +             case STRMMODE_ZEROCOPY:
>
> ...
>
>> +             case STRMMODE_PROCCOPY:
>
> It looks like all modes are handled here although the only one that
> could escape the validation from above is STRMMODE_PROCCOPY.
>
> I tried removing the first check and tested with the
> userspace-dspbridge strmcopy application, but I noticed the DSP hangs if
> I try to use it with anything else than the copy mode.
>
> Are the other modes (rdma, zerocopy) not supported at all?

No, those modes are not supported... the only one working for dsp
streams is proc-copy.

Regards,

Omar
--
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