All of lore.kernel.org
 help / color / mirror / Atom feed
* header change affects c++ projects
@ 2015-03-29  8:34 Michael Cronenworth
  2015-03-29 18:57 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Cronenworth @ 2015-03-29  8:34 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

The move of "bswap_128()" in commit 
232015aeefd1c945ccfaf9744e791c5888eafcf7 breaks C++ projects. 
Specifically: The bswap_128() function is, without a cast, assigning a 
void* to a uint8_t*.

Can someone please review this commit? The message claims it is a "fix" 
but all I see is code copy and pasted along with a precision loss from 
uint128_t to uint8_t.

Thank you,
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: header change affects c++ projects
  2015-03-29  8:34 header change affects c++ projects Michael Cronenworth
@ 2015-03-29 18:57 ` Luiz Augusto von Dentz
  2015-03-29 20:20   ` Michael Cronenworth
  0 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2015-03-29 18:57 UTC (permalink / raw)
  To: Michael Cronenworth; +Cc: linux-bluetooth

Hi Michael,

On Sun, Mar 29, 2015 at 11:34 AM, Michael Cronenworth <mike@cchtml.com> wrote:
> Hello,
>
> The move of "bswap_128()" in commit 232015aeefd1c945ccfaf9744e791c5888eafcf7
> breaks C++ projects. Specifically: The bswap_128() function is, without a
> cast, assigning a void* to a uint8_t*.

It will probably get applied, no reason to get neurotic on the weekend
no one said we would not take it, so please be patience.

> Can someone please review this commit? The message claims it is a "fix" but
> all I see is code copy and pasted along with a precision loss from uint128_t
> to uint8_t.

It is a fix to uuid: Add bt_uuid_to_le since the convention is to
define 128 bit UUIDs as big endian which then need to be swaped
regardless of endianess.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: header change affects c++ projects
  2015-03-29 18:57 ` Luiz Augusto von Dentz
@ 2015-03-29 20:20   ` Michael Cronenworth
  2015-03-30  7:13     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Cronenworth @ 2015-03-29 20:20 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

On 03/29/2015 01:57 PM, Luiz Augusto von Dentz wrote:
> It will probably get applied, no reason to get neurotic on the weekend
> no one said we would not take it, so please be patience.

I'm not following you here. What are you trying to say?

> It is a fix to uuid: Add bt_uuid_to_le since the convention is to define 128 bit 
> UUIDs as big endian which then need to be swaped regardless of endianess.

The commit doesn't change anything though. Please revert it or fix it to not have a 
conversion or precision loss. If you need help I will make a patch.

Thanks,
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: header change affects c++ projects
  2015-03-29 20:20   ` Michael Cronenworth
@ 2015-03-30  7:13     ` Luiz Augusto von Dentz
  2015-03-30 13:15       ` Michael Cronenworth
  0 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2015-03-30  7:13 UTC (permalink / raw)
  To: Michael Cronenworth; +Cc: linux-bluetooth

Hi Michael,

On Sun, Mar 29, 2015 at 11:20 PM, Michael Cronenworth <mike@cchtml.com> wrote:
> On 03/29/2015 01:57 PM, Luiz Augusto von Dentz wrote:
>>
>> It will probably get applied, no reason to get neurotic on the weekend
>> no one said we would not take it, so please be patience.
>
>
> I'm not following you here. What are you trying to say?

I though you were the same guy sending the patch, nevermind we have a
fix already.

>> It is a fix to uuid: Add bt_uuid_to_le since the convention is to define
>> 128 bit UUIDs as big endian which then need to be swaped regardless of
>> endianess.
>
>
> The commit doesn't change anything though. Please revert it or fix it to not
> have a conversion or precision loss. If you need help I will make a patch.

uint128_t is a byte array:

typedef struct {
uint8_t data[16];
} uint128_t;

There is no precision loss.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: header change affects c++ projects
  2015-03-30  7:13     ` Luiz Augusto von Dentz
@ 2015-03-30 13:15       ` Michael Cronenworth
  2015-03-30 15:15         ` Michael Cronenworth
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Cronenworth @ 2015-03-30 13:15 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

On 03/30/2015 02:13 AM, Luiz Augusto von Dentz wrote:
> uint128_t is a byte array:
>
> typedef struct {
> uint8_t data[16];
> } uint128_t;
>
> There is no precision loss.

Thanks, I did not see the definition.

However, the conversion of void* *must* be fixed. This is the key issue.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: header change affects c++ projects
  2015-03-30 13:15       ` Michael Cronenworth
@ 2015-03-30 15:15         ` Michael Cronenworth
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Cronenworth @ 2015-03-30 15:15 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

On 03/30/2015 08:15 AM, Michael Cronenworth wrote:
>
> However, the conversion of void* *must* be fixed. This is the key issue.

I see you committed a fix this morning, thanks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* header change affects c++ projects
@ 2015-03-29  8:47 Michael Cronenworth
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Cronenworth @ 2015-03-29  8:47 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

The move of "bswap_128()" in commit 
232015aeefd1c945ccfaf9744e791c5888eafcf7 breaks C++ projects. 
Specifically: The bswap_128() function is, without a cast, assigning a 
void* to a uint8_t*.

Can someone please review this commit? The message claims it is a "fix" 
but all I see is code copy and pasted along with a precision loss from 
uint128_t to uint8_t.

Thank you,
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-30 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-29  8:34 header change affects c++ projects Michael Cronenworth
2015-03-29 18:57 ` Luiz Augusto von Dentz
2015-03-29 20:20   ` Michael Cronenworth
2015-03-30  7:13     ` Luiz Augusto von Dentz
2015-03-30 13:15       ` Michael Cronenworth
2015-03-30 15:15         ` Michael Cronenworth
2015-03-29  8:47 Michael Cronenworth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.