Re: [PATCH] dspbridge: Fix atoi to support hexadecimal numbers correctly

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

 



On Wed, Dec 22, 2010 at 7:00 PM, Ramirez Luna, Omar <omar.ramirez@xxxxxx> wrote:
> On Sun, Dec 12, 2010 at 7:39 AM, Laurent Pinchart
> <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>> For some strange reason, the DSP base image node/object properties
>> description string stores hexadecimal numbers with a 'h' or 'H' suffix
>> instead of a '0x' prefix. This causes parsing issue because the
>> dspbridge atoi() implementation relies on strict_strtoul(), which will
>> return an error because of the trailing 'h' character.
>>
>> As the atoi() return value is never checked for an error anyway, replace
>> strict_strtoul() with simple_strtoul() to ignore the suffix.
>>
>> This fix gets rid of the following assertion failed messages that were
>> printed when running the dsp-dummy test application.
>>
>> drivers/staging/tidspbridge/rmgr/nldr.c, line 1691:
>> Assertion (segid == MEMINTERNALID || segid == MEMEXTERNALID) failed.
>>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
>> ---
>>  drivers/staging/tidspbridge/rmgr/dbdcd.c |    6 +-----
>>  1 files changed, 1 insertions(+), 5 deletions(-)
>
> This patch raises a checkpatch warning:
> WARNING: consider using strict_strtoul in preference to simple_strtoul
>
> However on this case, simple_strtoul is preferred as explained in the commit.
>
> Pushed to dspbridge.

BTW, fixing subject to "staging: tidspbridge"

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