* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
@ 2015-07-22 21:16 Stephen Warren
2015-07-23 7:00 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stephen Warren @ 2015-07-22 21:16 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
builds", but more.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
drivers/usb/gadget/ci_udc.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index aadff42a9cdc..993be315a8cf 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -221,8 +221,8 @@ static void ci_flush_qtd(int ep_num)
*/
static void ci_flush_td(struct ept_queue_item *td)
{
- const uint32_t start = (uint32_t)td;
- const uint32_t end = (uint32_t) td + ILIST_ENT_SZ;
+ const unsigned long start = (unsigned long)td;
+ const unsigned long end = (unsigned long)td + ILIST_ENT_SZ;
flush_dcache_range(start, end);
}
@@ -249,8 +249,8 @@ static void ci_invalidate_qtd(int ep_num)
*/
static void ci_invalidate_td(struct ept_queue_item *td)
{
- const uint32_t start = (uint32_t)td;
- const uint32_t end = start + ILIST_ENT_SZ;
+ const unsigned long start = (unsigned long)td;
+ const unsigned long end = start + ILIST_ENT_SZ;
invalidate_dcache_range(start, end);
}
@@ -459,7 +459,7 @@ static void ci_ep_submit_next_request(struct ci_ep *ci_ep)
if (len) {
qtd = (struct ept_queue_item *)
memalign(ILIST_ALIGN, ILIST_ENT_SZ);
- dtd->next = (uint32_t)qtd;
+ dtd->next = (unsigned long)qtd;
dtd = qtd;
memset(dtd, 0, ILIST_ENT_SZ);
}
@@ -503,10 +503,10 @@ static void ci_ep_submit_next_request(struct ci_ep *ci_ep)
ci_flush_qtd(num);
- item = (struct ept_queue_item *)head->next;
+ item = (struct ept_queue_item *)(unsigned long)head->next;
while (item->next != TERMINATE) {
- ci_flush_td((struct ept_queue_item *)item->next);
- item = (struct ept_queue_item *)item->next;
+ ci_flush_td((struct ept_queue_item *)(unsigned long)item->next);
+ item = (struct ept_queue_item *)(unsigned long)item->next;
}
DBG("ept%d %s queue len %x, req %p, buffer %p\n",
@@ -594,7 +594,8 @@ static void handle_ep_complete(struct ci_ep *ci_ep)
printf("EP%d/%s FAIL info=%x pg0=%x\n",
num, in ? "in" : "out", item->info, item->page0);
if (j != ci_req->dtd_count - 1)
- next_td = (struct ept_queue_item *)item->next;
+ next_td = (struct ept_queue_item *)(unsigned long)
+ item->next;
if (j != 0)
free(item);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
2015-07-22 21:16 [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings Stephen Warren
@ 2015-07-23 7:00 ` Marek Vasut
2015-07-23 7:00 ` Lukasz Majewski
2015-07-23 7:09 ` Lukasz Majewski
2 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2015-07-23 7:00 UTC (permalink / raw)
To: u-boot
On Wednesday, July 22, 2015 at 11:16:20 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
> builds", but more.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Applied, thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
2015-07-22 21:16 [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings Stephen Warren
2015-07-23 7:00 ` Marek Vasut
@ 2015-07-23 7:00 ` Lukasz Majewski
2015-07-23 7:03 ` Marek Vasut
2015-07-23 7:09 ` Lukasz Majewski
2 siblings, 1 reply; 6+ messages in thread
From: Lukasz Majewski @ 2015-07-23 7:00 UTC (permalink / raw)
To: u-boot
Hi Marek,
> From: Stephen Warren <swarren@nvidia.com>
>
> This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
> builds", but more.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> drivers/usb/gadget/ci_udc.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index aadff42a9cdc..993be315a8cf 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -221,8 +221,8 @@ static void ci_flush_qtd(int ep_num)
> */
> static void ci_flush_td(struct ept_queue_item *td)
> {
> - const uint32_t start = (uint32_t)td;
> - const uint32_t end = (uint32_t) td + ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)td;
> + const unsigned long end = (unsigned long)td + ILIST_ENT_SZ;
> flush_dcache_range(start, end);
> }
>
> @@ -249,8 +249,8 @@ static void ci_invalidate_qtd(int ep_num)
> */
> static void ci_invalidate_td(struct ept_queue_item *td)
> {
> - const uint32_t start = (uint32_t)td;
> - const uint32_t end = start + ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)td;
> + const unsigned long end = start + ILIST_ENT_SZ;
> invalidate_dcache_range(start, end);
> }
>
> @@ -459,7 +459,7 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep) if (len) {
> qtd = (struct ept_queue_item *)
> memalign(ILIST_ALIGN, ILIST_ENT_SZ);
> - dtd->next = (uint32_t)qtd;
> + dtd->next = (unsigned long)qtd;
> dtd = qtd;
> memset(dtd, 0, ILIST_ENT_SZ);
> }
> @@ -503,10 +503,10 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep)
> ci_flush_qtd(num);
>
> - item = (struct ept_queue_item *)head->next;
> + item = (struct ept_queue_item *)(unsigned long)head->next;
> while (item->next != TERMINATE) {
> - ci_flush_td((struct ept_queue_item *)item->next);
> - item = (struct ept_queue_item *)item->next;
> + ci_flush_td((struct ept_queue_item *)(unsigned
> long)item->next);
> + item = (struct ept_queue_item *)(unsigned
> long)item->next; }
>
> DBG("ept%d %s queue len %x, req %p, buffer %p\n",
> @@ -594,7 +594,8 @@ static void handle_ep_complete(struct ci_ep
> *ci_ep) printf("EP%d/%s FAIL info=%x pg0=%x\n",
> num, in ? "in" : "out", item->info,
> item->page0); if (j != ci_req->dtd_count - 1)
> - next_td = (struct ept_queue_item
> *)item->next;
> + next_td = (struct ept_queue_item *)(unsigned
> long)
> + item->next;
> if (j != 0)
> free(item);
> }
Should I take the patch to -dfu tree?
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
2015-07-23 7:00 ` Lukasz Majewski
@ 2015-07-23 7:03 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2015-07-23 7:03 UTC (permalink / raw)
To: u-boot
On Thursday, July 23, 2015 at 09:00:53 AM, Lukasz Majewski wrote:
> Hi Marek,
>
> > From: Stephen Warren <swarren@nvidia.com>
> >
> > This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
> > builds", but more.
> >
> > Signed-off-by: Stephen Warren <swarren@nvidia.com>
> > ---
> >
> > drivers/usb/gadget/ci_udc.c | 19 ++++++++++---------
> > 1 file changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> > index aadff42a9cdc..993be315a8cf 100644
> > --- a/drivers/usb/gadget/ci_udc.c
> > +++ b/drivers/usb/gadget/ci_udc.c
> > @@ -221,8 +221,8 @@ static void ci_flush_qtd(int ep_num)
> >
> > */
> >
> > static void ci_flush_td(struct ept_queue_item *td)
> > {
> >
> > - const uint32_t start = (uint32_t)td;
> > - const uint32_t end = (uint32_t) td + ILIST_ENT_SZ;
> > + const unsigned long start = (unsigned long)td;
> > + const unsigned long end = (unsigned long)td + ILIST_ENT_SZ;
> >
> > flush_dcache_range(start, end);
> >
> > }
> >
> > @@ -249,8 +249,8 @@ static void ci_invalidate_qtd(int ep_num)
> >
> > */
> >
> > static void ci_invalidate_td(struct ept_queue_item *td)
> > {
> >
> > - const uint32_t start = (uint32_t)td;
> > - const uint32_t end = start + ILIST_ENT_SZ;
> > + const unsigned long start = (unsigned long)td;
> > + const unsigned long end = start + ILIST_ENT_SZ;
> >
> > invalidate_dcache_range(start, end);
> >
> > }
> >
> > @@ -459,7 +459,7 @@ static void ci_ep_submit_next_request(struct
> > ci_ep *ci_ep) if (len) {
> >
> > qtd = (struct ept_queue_item *)
> >
> > memalign(ILIST_ALIGN, ILIST_ENT_SZ);
> >
> > - dtd->next = (uint32_t)qtd;
> > + dtd->next = (unsigned long)qtd;
> >
> > dtd = qtd;
> > memset(dtd, 0, ILIST_ENT_SZ);
> >
> > }
> >
> > @@ -503,10 +503,10 @@ static void ci_ep_submit_next_request(struct
> > ci_ep *ci_ep)
> >
> > ci_flush_qtd(num);
> >
> > - item = (struct ept_queue_item *)head->next;
> > + item = (struct ept_queue_item *)(unsigned long)head->next;
> >
> > while (item->next != TERMINATE) {
> >
> > - ci_flush_td((struct ept_queue_item *)item->next);
> > - item = (struct ept_queue_item *)item->next;
> > + ci_flush_td((struct ept_queue_item *)(unsigned
> > long)item->next);
> > + item = (struct ept_queue_item *)(unsigned
> > long)item->next; }
> >
> > DBG("ept%d %s queue len %x, req %p, buffer %p\n",
> >
> > @@ -594,7 +594,8 @@ static void handle_ep_complete(struct ci_ep
> > *ci_ep) printf("EP%d/%s FAIL info=%x pg0=%x\n",
> >
> > num, in ? "in" : "out", item->info,
> >
> > item->page0); if (j != ci_req->dtd_count - 1)
> > - next_td = (struct ept_queue_item
> > *)item->next;
> > + next_td = (struct ept_queue_item *)(unsigned
> > long)
> > + item->next;
> >
> > if (j != 0)
> >
> > free(item);
> >
> > }
>
> Should I take the patch to -dfu tree?
I picked it for -usb . I will wait until the weekend, then build and send a PR
to Tom.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
2015-07-22 21:16 [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings Stephen Warren
2015-07-23 7:00 ` Marek Vasut
2015-07-23 7:00 ` Lukasz Majewski
@ 2015-07-23 7:09 ` Lukasz Majewski
2015-07-23 7:19 ` Marek Vasut
2 siblings, 1 reply; 6+ messages in thread
From: Lukasz Majewski @ 2015-07-23 7:09 UTC (permalink / raw)
To: u-boot
Hi Marek,
> From: Stephen Warren <swarren@nvidia.com>
>
> This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
> builds", but more.
>
Never mind :-). It is already in your tree. Sorry for the noise.
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> drivers/usb/gadget/ci_udc.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index aadff42a9cdc..993be315a8cf 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -221,8 +221,8 @@ static void ci_flush_qtd(int ep_num)
> */
> static void ci_flush_td(struct ept_queue_item *td)
> {
> - const uint32_t start = (uint32_t)td;
> - const uint32_t end = (uint32_t) td + ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)td;
> + const unsigned long end = (unsigned long)td + ILIST_ENT_SZ;
> flush_dcache_range(start, end);
> }
>
> @@ -249,8 +249,8 @@ static void ci_invalidate_qtd(int ep_num)
> */
> static void ci_invalidate_td(struct ept_queue_item *td)
> {
> - const uint32_t start = (uint32_t)td;
> - const uint32_t end = start + ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)td;
> + const unsigned long end = start + ILIST_ENT_SZ;
> invalidate_dcache_range(start, end);
> }
>
> @@ -459,7 +459,7 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep) if (len) {
> qtd = (struct ept_queue_item *)
> memalign(ILIST_ALIGN, ILIST_ENT_SZ);
> - dtd->next = (uint32_t)qtd;
> + dtd->next = (unsigned long)qtd;
> dtd = qtd;
> memset(dtd, 0, ILIST_ENT_SZ);
> }
> @@ -503,10 +503,10 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep)
> ci_flush_qtd(num);
>
> - item = (struct ept_queue_item *)head->next;
> + item = (struct ept_queue_item *)(unsigned long)head->next;
> while (item->next != TERMINATE) {
> - ci_flush_td((struct ept_queue_item *)item->next);
> - item = (struct ept_queue_item *)item->next;
> + ci_flush_td((struct ept_queue_item *)(unsigned
> long)item->next);
> + item = (struct ept_queue_item *)(unsigned
> long)item->next; }
>
> DBG("ept%d %s queue len %x, req %p, buffer %p\n",
> @@ -594,7 +594,8 @@ static void handle_ep_complete(struct ci_ep
> *ci_ep) printf("EP%d/%s FAIL info=%x pg0=%x\n",
> num, in ? "in" : "out", item->info,
> item->page0); if (j != ci_req->dtd_count - 1)
> - next_td = (struct ept_queue_item
> *)item->next;
> + next_td = (struct ept_queue_item *)(unsigned
> long)
> + item->next;
> if (j != 0)
> free(item);
> }
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings
2015-07-23 7:09 ` Lukasz Majewski
@ 2015-07-23 7:19 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2015-07-23 7:19 UTC (permalink / raw)
To: u-boot
On Thursday, July 23, 2015 at 09:09:44 AM, Lukasz Majewski wrote:
> Hi Marek,
>
> > From: Stephen Warren <swarren@nvidia.com>
> >
> > This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
> > builds", but more.
>
> Never mind :-). It is already in your tree. Sorry for the noise.
No worries :)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-23 7:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 21:16 [U-Boot] [PATCH] ci_udc: fix 64-bit compile warnings Stephen Warren
2015-07-23 7:00 ` Marek Vasut
2015-07-23 7:00 ` Lukasz Majewski
2015-07-23 7:03 ` Marek Vasut
2015-07-23 7:09 ` Lukasz Majewski
2015-07-23 7:19 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox