Re: [RFC 2/7] Use memcpy to convert from network to host order on BE hosts

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

 



Hi Lizardo,

On Wed, Feb 16, 2011 at 3:02 PM, Anderson Lizardo
<anderson.lizardo@xxxxxxxxxxxxx> wrote:
> Hi Claudio,
>
> On Fri, Feb 11, 2011 at 5:37 PM, Claudio Takahasi
> <claudio.takahasi@xxxxxxxxxxxxx> wrote:
>> ---
>> Âlib/bluetooth.h | Â Â4 +---
>> Â1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/bluetooth.h b/lib/bluetooth.h
>> index bc020ad..d8f36f8 100644
>> --- a/lib/bluetooth.h
>> +++ b/lib/bluetooth.h
>> @@ -127,9 +127,7 @@ static inline void btoh128(const uint128_t *src, uint128_t *dst)
>> Â#define ntoh64(x) (x)
>> Âstatic inline void ntoh128(const uint128_t *src, uint128_t *dst)
>> Â{
>> - Â Â Â int i;
>> - Â Â Â for (i = 0; i < 16; i++)
>> - Â Â Â Â Â Â Â dst->data[i] = src->data[i];
>> + Â Â Â memcpy(dst, src, sizeof(uint128_t));
>> Â}
>
> I believe this patch is harmless and can be already applied
> independently from other patches on this series, right?
>
> Regards,
> --
> Anderson Lizardo
> Instituto Nokia de Tecnologia - INdT
> Manaus - Brazil
>

Yes, it is harmless. I gonna remove this patch from this series and
also add extra comments to emphasize that it is not converting the
value, it just replace the for by a direct memory copy for BE hosts.

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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux