public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
@ 2011-11-16  4:17 Simon Glass
  2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Simon Glass @ 2011-11-16  4:17 UTC (permalink / raw)
  To: u-boot

Sorry if this is already fixed somewhere - I could not find it.

This fixes these warnings:

usb_ohci.c: In function 'submit_control_msg':
usb_ohci.c:1081: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
usb_ohci.c:1081: note: initialized from here
usb_ohci.c:1084: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
usb_ohci.c:1084: note: initialized from here
usb_ohci.c:1087: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
usb_ohci.c:1087: note: initialized from here

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
index 263d2ce..80bb61b27 100644
--- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
+++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
@@ -1041,8 +1041,12 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
 	int leni = transfer_len;
 	int len = 0;
 	int stat = 0;
-	__u32 datab[4];
-	__u8 *data_buf = (__u8 *) datab;
+	union {
+		__u32 word[4];
+		__u16 hword[8];
+		__u8 byte[16];
+	} datab;
+	__u8 *data_buf = datab.byte;
 	__u16 bmRType_bReq;
 	__u16 wValue;
 	__u16 wIndex;
@@ -1078,20 +1082,20 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
 		 */
 
 	case RH_GET_STATUS:
-		*(__u16 *) data_buf = m16_swap(1);
+		datab.hword[0] = m16_swap(1);
 		OK(2);
 	case RH_GET_STATUS | RH_INTERFACE:
-		*(__u16 *) data_buf = m16_swap(0);
+		datab.hword[0] = m16_swap(0);
 		OK(2);
 	case RH_GET_STATUS | RH_ENDPOINT:
-		*(__u16 *) data_buf = m16_swap(0);
+		datab.hword[0] = m16_swap(0);
 		OK(2);
 	case RH_GET_STATUS | RH_CLASS:
-		*(__u32 *) data_buf =
+		datab.word[0] =
 		    m32_swap(RD_RH_STAT & ~(RH_HS_CRWE | RH_HS_DRWE));
 		OK(4);
 	case RH_GET_STATUS | RH_OTHER | RH_CLASS:
-		*(__u32 *) data_buf = m32_swap(RD_RH_PORTSTAT);
+		datab.word[0] = m32_swap(RD_RH_PORTSTAT);
 		OK(4);
 
 	case RH_CLEAR_FEATURE | RH_ENDPOINT:
@@ -1223,7 +1227,7 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
 				data_buf[3] |= 0x8;
 
 			/* corresponds to data_buf[4-7] */
-			datab[1] = 0;
+			datab.word[1] = 0;
 			data_buf[5] = (temp & RH_A_POTPGT) >> 24;
 			temp = roothub_b(&gohci);
 			data_buf[7] = temp & RH_B_DR;
-- 
1.7.3.1

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

* [U-Boot] [PATCH 2/2] Fix warnings in yaffs
  2011-11-16  4:17 [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Simon Glass
@ 2011-11-16  4:17 ` Simon Glass
  2011-11-16 20:39   ` Wolfgang Denk
  2011-11-16 21:38   ` Mike Frysinger
  2011-11-16 16:03 ` [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Mike Frysinger
  2011-12-09  9:33 ` Wolfgang Denk
  2 siblings, 2 replies; 14+ messages in thread
From: Simon Glass @ 2011-11-16  4:17 UTC (permalink / raw)
  To: u-boot

Sorry if this is already fixed somewhere - I could not find it.

This fixes the warnings show below.

yaffs_tagscompat.c: In function 'yaffs_TagsCompatabilityReadChunkWithTagsFromNAND':
yaffs_tagscompat.c:151: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:150: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:149: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:148: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:147: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:146: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:145: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:144: warning: dereferencing pointer 'tu' does break strict-aliasing rules
yaffs_tagscompat.c:141: note: initialized from here

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 fs/yaffs2/yaffs_tagscompat.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/yaffs2/yaffs_tagscompat.c b/fs/yaffs2/yaffs_tagscompat.c
index 70a8a8c..e872323 100644
--- a/fs/yaffs2/yaffs_tagscompat.c
+++ b/fs/yaffs2/yaffs_tagscompat.c
@@ -136,9 +136,8 @@ static void yaffs_LoadTagsIntoSpare(yaffs_Spare * sparePtr,
 }
 
 static void yaffs_GetTagsFromSpare(yaffs_Device * dev, yaffs_Spare * sparePtr,
-				   yaffs_Tags * tagsPtr)
+				   yaffs_TagsUnion *tu)
 {
-	yaffs_TagsUnion *tu = (yaffs_TagsUnion *) tagsPtr;
 	int result;
 
 	tu->asBytes[0] = sparePtr->tagByte0;
@@ -150,7 +149,7 @@ static void yaffs_GetTagsFromSpare(yaffs_Device * dev, yaffs_Spare * sparePtr,
 	tu->asBytes[6] = sparePtr->tagByte6;
 	tu->asBytes[7] = sparePtr->tagByte7;
 
-	result = yaffs_CheckECCOnTags(tagsPtr);
+	result = yaffs_CheckECCOnTags(&tu->asTags);
 	if (result > 0) {
 		dev->tagsEccFixed++;
 	} else if (result < 0) {
@@ -437,7 +436,7 @@ int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev,
 {
 
 	yaffs_Spare spare;
-	yaffs_Tags tags;
+	yaffs_TagsUnion tags;
 	yaffs_ECCResult eccResult;
 
 	static yaffs_Spare spareFF;
@@ -467,10 +466,10 @@ int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev,
 			if (eTags->chunkUsed) {
 				yaffs_GetTagsFromSpare(dev, &spare, &tags);
 
-				eTags->objectId = tags.objectId;
-				eTags->chunkId = tags.chunkId;
-				eTags->byteCount = tags.byteCount;
-				eTags->serialNumber = tags.serialNumber;
+				eTags->objectId = tags.asTags.objectId;
+				eTags->chunkId = tags.asTags.chunkId;
+				eTags->byteCount = tags.asTags.byteCount;
+				eTags->serialNumber = tags.asTags.serialNumber;
 			}
 		}
 
-- 
1.7.3.1

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-16  4:17 [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Simon Glass
  2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
@ 2011-11-16 16:03 ` Mike Frysinger
  2011-11-16 21:16   ` Simon Glass
  2011-12-09  9:33 ` Wolfgang Denk
  2 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2011-11-16 16:03 UTC (permalink / raw)
  To: u-boot

On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>
> -	__u32 datab[4];
> -	__u8 *data_buf = (__u8 *) datab;
> +	union {
> +		__u32 word[4];
> +		__u16 hword[8];
> +		__u8 byte[16];
> +	} datab;
> +	__u8 *data_buf = datab.byte;

i thought someone posted this fix to the list before.  but maybe it was for a 
different controller.  perhaps this code has been copied/pasted all over ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111116/00dc6e4c/attachment.pgp 

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

* [U-Boot] [PATCH 2/2] Fix warnings in yaffs
  2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
@ 2011-11-16 20:39   ` Wolfgang Denk
  2011-11-16 21:38   ` Mike Frysinger
  1 sibling, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:39 UTC (permalink / raw)
  To: u-boot

Dear Simon Glass,

In message <1321417027-5639-2-git-send-email-sjg@chromium.org> you wrote:
> Sorry if this is already fixed somewhere - I could not find it.
> 
> This fixes the warnings show below.
> 
> yaffs_tagscompat.c: In function 'yaffs_TagsCompatabilityReadChunkWithTagsFromNAND':
> yaffs_tagscompat.c:151: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:150: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:149: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:148: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:147: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:146: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:145: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:144: warning: dereferencing pointer 'tu' does break strict-aliasing rules
> yaffs_tagscompat.c:141: note: initialized from here
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  fs/yaffs2/yaffs_tagscompat.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
But the only way of discovering the limits  of  the  possible  is  to
venture a little way past them into the impossible.
                         - _Profiles of the Future_ (1962; rev. 1973)
                  ``Hazards of Prophecy: The Failure of Imagination''

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-16 16:03 ` [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Mike Frysinger
@ 2011-11-16 21:16   ` Simon Glass
  2011-11-16 21:37     ` Mike Frysinger
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Glass @ 2011-11-16 21:16 UTC (permalink / raw)
  To: u-boot

Hi Mike,

On Wed, Nov 16, 2011 at 8:03 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
>> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>>
>> - ? ? __u32 datab[4];
>> - ? ? __u8 *data_buf = (__u8 *) datab;
>> + ? ? union {
>> + ? ? ? ? ? ? __u32 word[4];
>> + ? ? ? ? ? ? __u16 hword[8];
>> + ? ? ? ? ? ? __u8 byte[16];
>> + ? ? } datab;
>> + ? ? __u8 *data_buf = datab.byte;
>
> i thought someone posted this fix to the list before. ?but maybe it was for a
> different controller. ?perhaps this code has been copied/pasted all over ...
> -mike
>

Yes I found Marek's patch to another file with the same name, and much
of the same code :-( But I don't think we currently have a patch for
this file. It issues warnings in about 10 ARM builds from memory.

Regards,
Simon

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-16 21:16   ` Simon Glass
@ 2011-11-16 21:37     ` Mike Frysinger
  2011-11-18  2:35       ` Marek Vasut
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2011-11-16 21:37 UTC (permalink / raw)
  To: u-boot

On Wednesday 16 November 2011 16:16:49 Simon Glass wrote:
> On Wed, Nov 16, 2011 at 8:03 AM, Mike Frysinger wrote:
> > On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
> >> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
> >> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
> >> 
> >> -     __u32 datab[4];
> >> -     __u8 *data_buf = (__u8 *) datab;
> >> +     union {
> >> +             __u32 word[4];
> >> +             __u16 hword[8];
> >> +             __u8 byte[16];
> >> +     } datab;
> >> +     __u8 *data_buf = datab.byte;
> > 
> > i thought someone posted this fix to the list before.  but maybe it was
> > for a different controller.  perhaps this code has been copied/pasted
> > all over ... -mike
> 
> Yes I found Marek's patch to another file with the same name, and much
> of the same code :-( But I don't think we currently have a patch for
> this file. It issues warnings in about 10 ARM builds from memory.

np.  i know much of the u-boot arm tree (like Linux) has crappy cross-SoC 
integration.

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111116/69a6d558/attachment-0001.pgp 

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

* [U-Boot] [PATCH 2/2] Fix warnings in yaffs
  2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
  2011-11-16 20:39   ` Wolfgang Denk
@ 2011-11-16 21:38   ` Mike Frysinger
  2011-11-16 21:50     ` Simon Glass
  1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2011-11-16 21:38 UTC (permalink / raw)
  To: u-boot

On Tuesday 15 November 2011 23:17:07 Simon Glass wrote:
> Sorry if this is already fixed somewhere - I could not find it.
> 
> This fixes the warnings show below.

can you bounce this to the yaffs maintainers too ?

http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111116/c562c7ac/attachment.pgp 

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

* [U-Boot] [PATCH 2/2] Fix warnings in yaffs
  2011-11-16 21:38   ` Mike Frysinger
@ 2011-11-16 21:50     ` Simon Glass
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Glass @ 2011-11-16 21:50 UTC (permalink / raw)
  To: u-boot

Hi Mike,

On Wed, Nov 16, 2011 at 1:38 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Tuesday 15 November 2011 23:17:07 Simon Glass wrote:
>> Sorry if this is already fixed somewhere - I could not find it.
>>
>> This fixes the warnings show below.
>
> can you bounce this to the yaffs maintainers too ?
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> -mike
>

Have done so, thanks for the pointer. I couldn't find an entry in
MAINTAINERS (Hi Charles!). The code has been completely re-styled for
the Linux upstream effort so we should probably take a new drop one
day when that is complete.

Regards,
Simon

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-16 21:37     ` Mike Frysinger
@ 2011-11-18  2:35       ` Marek Vasut
  2011-11-18 22:47         ` Simon Glass
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2011-11-18  2:35 UTC (permalink / raw)
  To: u-boot

> On Wednesday 16 November 2011 16:16:49 Simon Glass wrote:
> > On Wed, Nov 16, 2011 at 8:03 AM, Mike Frysinger wrote:
> > > On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
> > >> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
> > >> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
> > >> 
> > >> -     __u32 datab[4];
> > >> -     __u8 *data_buf = (__u8 *) datab;
> > >> +     union {
> > >> +             __u32 word[4];
> > >> +             __u16 hword[8];
> > >> +             __u8 byte[16];
> > >> +     } datab;
> > >> +     __u8 *data_buf = datab.byte;
> > > 
> > > i thought someone posted this fix to the list before.  but maybe it was
> > > for a different controller.  perhaps this code has been copied/pasted
> > > all over ... -mike
> > 
> > Yes I found Marek's patch to another file with the same name, and much
> > of the same code :-( But I don't think we currently have a patch for
> > this file. It issues warnings in about 10 ARM builds from memory.
> 
> np.  i know much of the u-boot arm tree (like Linux) has crappy cross-SoC
> integration.
> 
> Acked-by: Mike Frysinger <vapier@gentoo.org>
> -mike

Well it kinda looks like this OHCI is copy of the drivers/usb/host/ohci-hcd.c ?

M

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-18  2:35       ` Marek Vasut
@ 2011-11-18 22:47         ` Simon Glass
  2011-12-02 16:33           ` Simon Glass
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Glass @ 2011-11-18 22:47 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Thu, Nov 17, 2011 at 6:35 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On Wednesday 16 November 2011 16:16:49 Simon Glass wrote:
>> > On Wed, Nov 16, 2011 at 8:03 AM, Mike Frysinger wrote:
>> > > On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
>> > >> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>> > >> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>> > >>
>> > >> - ? ? __u32 datab[4];
>> > >> - ? ? __u8 *data_buf = (__u8 *) datab;
>> > >> + ? ? union {
>> > >> + ? ? ? ? ? ? __u32 word[4];
>> > >> + ? ? ? ? ? ? __u16 hword[8];
>> > >> + ? ? ? ? ? ? __u8 byte[16];
>> > >> + ? ? } datab;
>> > >> + ? ? __u8 *data_buf = datab.byte;
>> > >
>> > > i thought someone posted this fix to the list before. ?but maybe it was
>> > > for a different controller. ?perhaps this code has been copied/pasted
>> > > all over ... -mike
>> >
>> > Yes I found Marek's patch to another file with the same name, and much
>> > of the same code :-( But I don't think we currently have a patch for
>> > this file. It issues warnings in about 10 ARM builds from memory.
>>
>> np. ?i know much of the u-boot arm tree (like Linux) has crappy cross-SoC
>> integration.
>>
>> Acked-by: Mike Frysinger <vapier@gentoo.org>
>> -mike
>
> Well it kinda looks like this OHCI is copy of the drivers/usb/host/ohci-hcd.c ?

Yes it is. We really need to push back harder on this sort of thing...

Regards,
Simon

>
> M
>

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-18 22:47         ` Simon Glass
@ 2011-12-02 16:33           ` Simon Glass
  2011-12-02 16:53             ` Stefano Babic
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Glass @ 2011-12-02 16:33 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Fri, Nov 18, 2011 at 2:47 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Marek,
>
> On Thu, Nov 17, 2011 at 6:35 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
>>> On Wednesday 16 November 2011 16:16:49 Simon Glass wrote:
>>> > On Wed, Nov 16, 2011 at 8:03 AM, Mike Frysinger wrote:
>>> > > On Tuesday 15 November 2011 23:17:06 Simon Glass wrote:
>>> > >> --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>>> > >> +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
>>> > >>
>>> > >> - ? ? __u32 datab[4];
>>> > >> - ? ? __u8 *data_buf = (__u8 *) datab;
>>> > >> + ? ? union {
>>> > >> + ? ? ? ? ? ? __u32 word[4];
>>> > >> + ? ? ? ? ? ? __u16 hword[8];
>>> > >> + ? ? ? ? ? ? __u8 byte[16];
>>> > >> + ? ? } datab;
>>> > >> + ? ? __u8 *data_buf = datab.byte;
>>> > >
>>> > > i thought someone posted this fix to the list before. ?but maybe it was
>>> > > for a different controller. ?perhaps this code has been copied/pasted
>>> > > all over ... -mike
>>> >
>>> > Yes I found Marek's patch to another file with the same name, and much
>>> > of the same code :-( But I don't think we currently have a patch for
>>> > this file. It issues warnings in about 10 ARM builds from memory.
>>>
>>> np. ?i know much of the u-boot arm tree (like Linux) has crappy cross-SoC
>>> integration.
>>>
>>> Acked-by: Mike Frysinger <vapier@gentoo.org>

Is this patch another candidate for your staging activity? It fixes
some build warnings for a number of ARM boards.

Regards,
Simon

>>> -mike
>>
>> Well it kinda looks like this OHCI is copy of the drivers/usb/host/ohci-hcd.c ?
>
> Yes it is. We really need to push back harder on this sort of thing...
>
> Regards,
> Simon
>
>>
>> M
>>
>

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-12-02 16:33           ` Simon Glass
@ 2011-12-02 16:53             ` Stefano Babic
  2011-12-02 17:02               ` Simon Glass
  0 siblings, 1 reply; 14+ messages in thread
From: Stefano Babic @ 2011-12-02 16:53 UTC (permalink / raw)
  To: u-boot

On 02/12/2011 17:33, Simon Glass wrote:
> Hi Stefan,
> 

Hi Simon,

>>>>> Yes I found Marek's patch to another file with the same name, and much
>>>>> of the same code :-( But I don't think we currently have a patch for
>>>>> this file. It issues warnings in about 10 ARM builds from memory.
>>>>
>>>> np.  i know much of the u-boot arm tree (like Linux) has crappy cross-SoC
>>>> integration.
>>>>
>>>> Acked-by: Mike Frysinger <vapier@gentoo.org>
> 
> Is this patch another candidate for your staging activity? It fixes
> some build warnings for a number of ARM boards.

No, this is related to ARM code and it is in the competence area of the
ARM custodian (Albert).

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-12-02 16:53             ` Stefano Babic
@ 2011-12-02 17:02               ` Simon Glass
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Glass @ 2011-12-02 17:02 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Fri, Dec 2, 2011 at 8:53 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 02/12/2011 17:33, Simon Glass wrote:
>> Hi Stefan,
>>
>
> Hi Simon,
>
>>>>>> Yes I found Marek's patch to another file with the same name, and much
>>>>>> of the same code :-( But I don't think we currently have a patch for
>>>>>> this file. It issues warnings in about 10 ARM builds from memory.
>>>>>
>>>>> np. ?i know much of the u-boot arm tree (like Linux) has crappy cross-SoC
>>>>> integration.
>>>>>
>>>>> Acked-by: Mike Frysinger <vapier@gentoo.org>
>>
>> Is this patch another candidate for your staging activity? It fixes
>> some build warnings for a number of ARM boards.
>
> No, this is related to ARM code and it is in the competence area of the
> ARM custodian (Albert).

Thanks for the quick response.

Albert, if you have time can you please take a look?

Regards,
Simon

>
> Best regards,
> Stefano Babic
>
> --
> =====================================================================
> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
> =====================================================================
>

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

* [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
  2011-11-16  4:17 [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Simon Glass
  2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
  2011-11-16 16:03 ` [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Mike Frysinger
@ 2011-12-09  9:33 ` Wolfgang Denk
  2 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-12-09  9:33 UTC (permalink / raw)
  To: u-boot

Dear Simon Glass,

In message <1321417027-5639-1-git-send-email-sjg@chromium.org> you wrote:
> Sorry if this is already fixed somewhere - I could not find it.
> 
> This fixes these warnings:
> 
> usb_ohci.c: In function 'submit_control_msg':
> usb_ohci.c:1081: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
> usb_ohci.c:1081: note: initialized from here
> usb_ohci.c:1084: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
> usb_ohci.c:1084: note: initialized from here
> usb_ohci.c:1087: warning: dereferencing pointer 'data_buf.76' does break strict-aliasing rules
> usb_ohci.c:1087: note: initialized from here
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |   20 ++++++++++++--------
>  1 files changed, 12 insertions(+), 8 deletions(-)

Applied, thanks.

Albert, Remy - hope this is OK with you.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If God wanted me to touch my toes, he'd have put them on my knees.

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

end of thread, other threads:[~2011-12-09  9:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16  4:17 [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Simon Glass
2011-11-16  4:17 ` [U-Boot] [PATCH 2/2] Fix warnings in yaffs Simon Glass
2011-11-16 20:39   ` Wolfgang Denk
2011-11-16 21:38   ` Mike Frysinger
2011-11-16 21:50     ` Simon Glass
2011-11-16 16:03 ` [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c Mike Frysinger
2011-11-16 21:16   ` Simon Glass
2011-11-16 21:37     ` Mike Frysinger
2011-11-18  2:35       ` Marek Vasut
2011-11-18 22:47         ` Simon Glass
2011-12-02 16:33           ` Simon Glass
2011-12-02 16:53             ` Stefano Babic
2011-12-02 17:02               ` Simon Glass
2011-12-09  9:33 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox