* [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets
@ 2018-01-27 19:48 Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 2/4] usb: gadget: dwc2: " Tom Rini
` (5 more replies)
0 siblings, 6 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:48 UTC (permalink / raw)
To: u-boot
When we have a driver that is used on both 32bit and 64bit targets and
we are talking about address space we cannot use u64 nor u32 and instead
need to use phys_addr_t.
Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue")
Cc: Stefan Chulski <stefanc@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
drivers/net/mvpp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 233c98b66c88..e3d31a560d54 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -4722,7 +4722,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
u32 id;
u32 phyaddr = 0;
int phy_mode = -1;
- u64 mdio_addr;
+ phys_addr_t mdio_addr;
phy_node = fdtdec_lookup_phandle(gd->fdt_blob, port_node, "phy");
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
@ 2018-01-27 19:48 ` Tom Rini
2018-01-27 19:52 ` Marek Vasut
2018-01-27 19:48 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning Tom Rini
` (4 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:48 UTC (permalink / raw)
To: u-boot
When we have a driver that is used on both 32bit and 64bit targets and
we are talking about address space we cannot use u64 nor u32 and instead
need to use phys_addr_t.
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index b6164afa9245..ec4b1e219ed0 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -114,7 +114,7 @@ static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
(unsigned long) ep->dma_buf +
ROUND(ep->len, CONFIG_SYS_CACHELINE_SIZE));
- writel((unsigned int) ep->dma_buf, ®->out_endp[ep_num].doepdma);
+ writel((phys_addr_t) ep->dma_buf, ®->out_endp[ep_num].doepdma);
writel(DOEPT_SIZ_PKT_CNT(pktcnt) | DOEPT_SIZ_XFER_SIZE(length),
®->out_endp[ep_num].doeptsiz);
writel(DEPCTL_EPENA|DEPCTL_CNAK|ctrl, ®->out_endp[ep_num].doepctl);
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 2/4] usb: gadget: dwc2: " Tom Rini
@ 2018-01-27 19:48 ` Tom Rini
2018-01-27 22:17 ` Marek Behun
2018-01-27 22:23 ` [U-Boot] [PATCH v2 " Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel() Tom Rini
` (3 subsequent siblings)
5 siblings, 2 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:48 UTC (permalink / raw)
To: u-boot
When printing a size_t value we need to use %zu for portability between
32bit and 64bit targets.
Cc: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 2529c2b3b6a6..b0a5cffce31e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -147,7 +147,7 @@ static int btrfs_check_super(struct btrfs_super_block *sb)
if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) +
sizeof(struct btrfs_chunk)) {
- printf("%s: system chunk array too small %u < %lu\n", __func__,
+ printf("%s: system chunk array too small %u < %zu\n", __func__,
sb->sys_chunk_array_size, (u32) sizeof(struct btrfs_key)
+ sizeof(struct btrfs_chunk));
ret = -1;
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel()
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 2/4] usb: gadget: dwc2: " Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning Tom Rini
@ 2018-01-27 19:48 ` Tom Rini
2018-01-27 19:53 ` Marek Vasut
2018-01-29 7:15 ` [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Stefan Roese
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:48 UTC (permalink / raw)
To: u-boot
The order of arguments for ehci_writel() is 'dest', 'value' and not
'value', 'dest'.
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
drivers/usb/host/ehci-mxs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 6b8d969bb000..9872415562c2 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -156,7 +156,7 @@ int ehci_hcd_stop(int index)
tmp = ehci_readl(&hcor->or_usbcmd);
tmp &= ~CMD_RUN;
- ehci_writel(tmp, &hcor->or_usbcmd);
+ ehci_writel(&hcor->or_usbcmd, tmp);
/* Disable the PHY */
tmp = USBPHY_PWD_RXPWDRX | USBPHY_PWD_RXPWDDIFF |
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:48 ` [U-Boot] [PATCH 2/4] usb: gadget: dwc2: " Tom Rini
@ 2018-01-27 19:52 ` Marek Vasut
2018-01-27 19:56 ` Tom Rini
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2018-01-27 19:52 UTC (permalink / raw)
To: u-boot
On 01/27/2018 08:48 PM, Tom Rini wrote:
> When we have a driver that is used on both 32bit and 64bit targets and
> we are talking about address space we cannot use u64 nor u32 and instead
> need to use phys_addr_t.
Can someoneone pass in a pointer above 32bit address range ? That might
cause some mess ...
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
> index b6164afa9245..ec4b1e219ed0 100644
> --- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
> +++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
> @@ -114,7 +114,7 @@ static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
> (unsigned long) ep->dma_buf +
> ROUND(ep->len, CONFIG_SYS_CACHELINE_SIZE));
>
> - writel((unsigned int) ep->dma_buf, ®->out_endp[ep_num].doepdma);
> + writel((phys_addr_t) ep->dma_buf, ®->out_endp[ep_num].doepdma);
> writel(DOEPT_SIZ_PKT_CNT(pktcnt) | DOEPT_SIZ_XFER_SIZE(length),
> ®->out_endp[ep_num].doeptsiz);
> writel(DEPCTL_EPENA|DEPCTL_CNAK|ctrl, ®->out_endp[ep_num].doepctl);
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel()
2018-01-27 19:48 ` [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel() Tom Rini
@ 2018-01-27 19:53 ` Marek Vasut
2018-01-27 19:53 ` Tom Rini
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2018-01-27 19:53 UTC (permalink / raw)
To: u-boot
On 01/27/2018 08:48 PM, Tom Rini wrote:
> The order of arguments for ehci_writel() is 'dest', 'value' and not
> 'value', 'dest'.
>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Already fixed and in the current USB PR, see:
usb: ehci: mxs: fix swapped argument in ehci_writel()
> ---
> drivers/usb/host/ehci-mxs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
> index 6b8d969bb000..9872415562c2 100644
> --- a/drivers/usb/host/ehci-mxs.c
> +++ b/drivers/usb/host/ehci-mxs.c
> @@ -156,7 +156,7 @@ int ehci_hcd_stop(int index)
>
> tmp = ehci_readl(&hcor->or_usbcmd);
> tmp &= ~CMD_RUN;
> - ehci_writel(tmp, &hcor->or_usbcmd);
> + ehci_writel(&hcor->or_usbcmd, tmp);
>
> /* Disable the PHY */
> tmp = USBPHY_PWD_RXPWDRX | USBPHY_PWD_RXPWDDIFF |
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel()
2018-01-27 19:53 ` Marek Vasut
@ 2018-01-27 19:53 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:53 UTC (permalink / raw)
To: u-boot
On Sat, Jan 27, 2018 at 08:53:34PM +0100, Marek Vasut wrote:
> On 01/27/2018 08:48 PM, Tom Rini wrote:
> > The order of arguments for ehci_writel() is 'dest', 'value' and not
> > 'value', 'dest'.
> >
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Marek Vasut <marex@denx.de>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
>
> Already fixed and in the current USB PR, see:
>
> usb: ehci: mxs: fix swapped argument in ehci_writel()
Yup, thanks, disregard.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180127/c3dfd5f3/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:52 ` Marek Vasut
@ 2018-01-27 19:56 ` Tom Rini
2018-01-27 20:09 ` Marek Vasut
2018-01-27 20:17 ` Dr. Philipp Tomsich
0 siblings, 2 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-27 19:56 UTC (permalink / raw)
To: u-boot
On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
> On 01/27/2018 08:48 PM, Tom Rini wrote:
> > When we have a driver that is used on both 32bit and 64bit targets and
> > we are talking about address space we cannot use u64 nor u32 and instead
> > need to use phys_addr_t.
>
> Can someoneone pass in a pointer above 32bit address range ? That might
> cause some mess ...
On rockchip, where this gets used as well, it comes down to writel and a
warning about "cast from pointer to integer of different size".
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180127/85da2e73/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:56 ` Tom Rini
@ 2018-01-27 20:09 ` Marek Vasut
2018-01-27 20:17 ` Dr. Philipp Tomsich
1 sibling, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2018-01-27 20:09 UTC (permalink / raw)
To: u-boot
On 01/27/2018 08:56 PM, Tom Rini wrote:
> On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
>> On 01/27/2018 08:48 PM, Tom Rini wrote:
>>> When we have a driver that is used on both 32bit and 64bit targets and
>>> we are talking about address space we cannot use u64 nor u32 and instead
>>> need to use phys_addr_t.
>>
>> Can someoneone pass in a pointer above 32bit address range ? That might
>> cause some mess ...
>
> On rockchip, where this gets used as well, it comes down to writel and a
> warning about "cast from pointer to integer of different size".
My concern is with passing addresses which the core cannot handle to the
core, addresses above 32bit address space. But that's probably not an
issue here.
btw it seems that the common practice in that driver is to cast it to
unsigned long, so I think you should be consistent and do that. Or even
better, adjust drivers/usb/gadget/dwc2_udc_otg_priv.h and change dma_buf
in struct dwc2_ep to phys_addr_t there, then you can probably drop all
the casts all over the dwc2 gadget and host drivers.
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:56 ` Tom Rini
2018-01-27 20:09 ` Marek Vasut
@ 2018-01-27 20:17 ` Dr. Philipp Tomsich
2018-01-27 20:31 ` Marek Vasut
1 sibling, 1 reply; 19+ messages in thread
From: Dr. Philipp Tomsich @ 2018-01-27 20:17 UTC (permalink / raw)
To: u-boot
> On 27 Jan 2018, at 20:56, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
>> On 01/27/2018 08:48 PM, Tom Rini wrote:
>>> When we have a driver that is used on both 32bit and 64bit targets and
>>> we are talking about address space we cannot use u64 nor u32 and instead
>>> need to use phys_addr_t.
>>
>> Can someoneone pass in a pointer above 32bit address range ? That might
>> cause some mess ...
>
> On rockchip, where this gets used as well, it comes down to writel and a
> warning about "cast from pointer to integer of different size”.
I had submitted a patch to resolve this middle of last year
https://patchwork.ozlabs.org/patch/783541/
and used the rationale that this change would make the truncation explicit.
I don’t recall why did this didn’t move anywhere, but darkly remember the
discussion veering towards bounce buffers…
Regards,
Philipp.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 20:17 ` Dr. Philipp Tomsich
@ 2018-01-27 20:31 ` Marek Vasut
2018-01-28 9:57 ` Lukasz Majewski
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2018-01-27 20:31 UTC (permalink / raw)
To: u-boot
On 01/27/2018 09:17 PM, Dr. Philipp Tomsich wrote:
>
>> On 27 Jan 2018, at 20:56, Tom Rini <trini@konsulko.com> wrote:
>>
>> On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
>>> On 01/27/2018 08:48 PM, Tom Rini wrote:
>>>> When we have a driver that is used on both 32bit and 64bit targets and
>>>> we are talking about address space we cannot use u64 nor u32 and instead
>>>> need to use phys_addr_t.
>>>
>>> Can someoneone pass in a pointer above 32bit address range ? That might
>>> cause some mess ...
>>
>> On rockchip, where this gets used as well, it comes down to writel and a
>> warning about "cast from pointer to integer of different size”.
>
> I had submitted a patch to resolve this middle of last year
> https://patchwork.ozlabs.org/patch/783541/
> and used the rationale that this change would make the truncation explicit.
>
> I don’t recall why did this didn’t move anywhere, but darkly remember the
> discussion veering towards bounce buffers…
I'll just bounce this to Lukasz, since he maintains the gadget, but the
DWC2 UDC driver looks really dark ... ew ...
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning
2018-01-27 19:48 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning Tom Rini
@ 2018-01-27 22:17 ` Marek Behun
2018-01-27 22:23 ` [U-Boot] [PATCH v2 " Tom Rini
1 sibling, 0 replies; 19+ messages in thread
From: Marek Behun @ 2018-01-27 22:17 UTC (permalink / raw)
To: u-boot
shouldn't in that case the (u32) cast be removed?
On Sat, 27 Jan 2018 14:48:10 -0500
Tom Rini <trini@konsulko.com> wrote:
> When printing a size_t value we need to use %zu for portability
> between 32bit and 64bit targets.
>
> Cc: Marek Behún <marek.behun@nic.cz>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> fs/btrfs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 2529c2b3b6a6..b0a5cffce31e 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -147,7 +147,7 @@ static int btrfs_check_super(struct
> btrfs_super_block *sb)
> if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) +
> sizeof(struct btrfs_chunk)) {
> - printf("%s: system chunk array too small %u <
> %lu\n", __func__,
> + printf("%s: system chunk array too small %u <
> %zu\n", __func__, sb->sys_chunk_array_size, (u32) sizeof(struct
> btrfs_key)
> + sizeof(struct btrfs_chunk));
> ret = -1;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH v2 3/4] fs: btrfs: Fix printf format character warning
2018-01-27 19:48 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning Tom Rini
2018-01-27 22:17 ` Marek Behun
@ 2018-01-27 22:23 ` Tom Rini
2018-01-27 22:36 ` Marek Behun
2018-01-29 20:21 ` [U-Boot] [U-Boot, v2, " Tom Rini
1 sibling, 2 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-27 22:23 UTC (permalink / raw)
To: u-boot
When printing a size_t value we need to use %zu for portability between
32bit and 64bit targets.
Cc: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2:
- Drop u32 cast, per Marek.
---
fs/btrfs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 2529c2b3b6a6..7e2528c4fb6f 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -147,8 +147,8 @@ static int btrfs_check_super(struct btrfs_super_block *sb)
if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) +
sizeof(struct btrfs_chunk)) {
- printf("%s: system chunk array too small %u < %lu\n", __func__,
- sb->sys_chunk_array_size, (u32) sizeof(struct btrfs_key)
+ printf("%s: system chunk array too small %u < %zu\n", __func__,
+ sb->sys_chunk_array_size, sizeof(struct btrfs_key)
+ sizeof(struct btrfs_chunk));
ret = -1;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH v2 3/4] fs: btrfs: Fix printf format character warning
2018-01-27 22:23 ` [U-Boot] [PATCH v2 " Tom Rini
@ 2018-01-27 22:36 ` Marek Behun
2018-01-29 20:21 ` [U-Boot] [U-Boot, v2, " Tom Rini
1 sibling, 0 replies; 19+ messages in thread
From: Marek Behun @ 2018-01-27 22:36 UTC (permalink / raw)
To: u-boot
Reviewed-by: Marek Behun <marek.behun@nic.cz>
On Sat, 27 Jan 2018 17:23:21 -0500
Tom Rini <trini@konsulko.com> wrote:
> When printing a size_t value we need to use %zu for portability
> between 32bit and 64bit targets.
>
> Cc: Marek Behún <marek.behun@nic.cz>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Changes in v2:
> - Drop u32 cast, per Marek.
> ---
> fs/btrfs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 2529c2b3b6a6..7e2528c4fb6f 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -147,8 +147,8 @@ static int btrfs_check_super(struct
> btrfs_super_block *sb)
> if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) +
> sizeof(struct btrfs_chunk)) {
> - printf("%s: system chunk array too small %u <
> %lu\n", __func__,
> - sb->sys_chunk_array_size, (u32) sizeof(struct
> btrfs_key)
> + printf("%s: system chunk array too small %u <
> %zu\n", __func__,
> + sb->sys_chunk_array_size, sizeof(struct
> btrfs_key)
> + sizeof(struct btrfs_chunk));
> ret = -1;
> }
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/4] usb: gadget: dwc2: Fix warning over 32bit vs 64bit targets
2018-01-27 20:31 ` Marek Vasut
@ 2018-01-28 9:57 ` Lukasz Majewski
0 siblings, 0 replies; 19+ messages in thread
From: Lukasz Majewski @ 2018-01-28 9:57 UTC (permalink / raw)
To: u-boot
Hi Marek, Tom, Philipp,
> On 01/27/2018 09:17 PM, Dr. Philipp Tomsich wrote:
> >
> >> On 27 Jan 2018, at 20:56, Tom Rini <trini@konsulko.com> wrote:
> >>
> >> On Sat, Jan 27, 2018 at 08:52:43PM +0100, Marek Vasut wrote:
> >>> On 01/27/2018 08:48 PM, Tom Rini wrote:
> >>>> When we have a driver that is used on both 32bit and 64bit
> >>>> targets and we are talking about address space we cannot use u64
> >>>> nor u32 and instead need to use phys_addr_t.
> >>>
> >>> Can someoneone pass in a pointer above 32bit address range ? That
> >>> might cause some mess ...
> >>
> >> On rockchip, where this gets used as well, it comes down to writel
> >> and a warning about "cast from pointer to integer of different
> >> size”.
I'm not sure if DWC2 is prepared to work with 64B pointers. As fair as
I remember it works with 32B.
> >
> > I had submitted a patch to resolve this middle of last year
> > https://patchwork.ozlabs.org/patch/783541/
Unfortunately, I did not received this patch.
> > and used the rationale that this change would make the truncation
> > explicit.
> >
> > I don’t recall why did this didn’t move anywhere, but darkly
> > remember the discussion veering towards bounce buffers…
>
> I'll just bounce this to Lukasz, since he maintains the gadget, but
> the DWC2 UDC driver looks really dark ... ew ...
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/91848388/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
` (2 preceding siblings ...)
2018-01-27 19:48 ` [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel() Tom Rini
@ 2018-01-29 7:15 ` Stefan Roese
2018-01-29 17:46 ` Joe Hershberger
2018-01-29 20:20 ` [U-Boot] [U-Boot, " Tom Rini
5 siblings, 0 replies; 19+ messages in thread
From: Stefan Roese @ 2018-01-29 7:15 UTC (permalink / raw)
To: u-boot
On 27.01.2018 20:48, Tom Rini wrote:
> When we have a driver that is used on both 32bit and 64bit targets and
> we are talking about address space we cannot use u64 nor u32 and instead
> need to use phys_addr_t.
>
> Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue")
> Cc: Stefan Chulski <stefanc@marvell.com>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> drivers/net/mvpp2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> index 233c98b66c88..e3d31a560d54 100644
> --- a/drivers/net/mvpp2.c
> +++ b/drivers/net/mvpp2.c
> @@ -4722,7 +4722,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
> u32 id;
> u32 phyaddr = 0;
> int phy_mode = -1;
> - u64 mdio_addr;
> + phys_addr_t mdio_addr;
>
> phy_node = fdtdec_lookup_phandle(gd->fdt_blob, port_node, "phy");
>
>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
` (3 preceding siblings ...)
2018-01-29 7:15 ` [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Stefan Roese
@ 2018-01-29 17:46 ` Joe Hershberger
2018-01-29 20:20 ` [U-Boot] [U-Boot, " Tom Rini
5 siblings, 0 replies; 19+ messages in thread
From: Joe Hershberger @ 2018-01-29 17:46 UTC (permalink / raw)
To: u-boot
On Sat, Jan 27, 2018 at 1:48 PM, Tom Rini <trini@konsulko.com> wrote:
> When we have a driver that is used on both 32bit and 64bit targets and
> we are talking about address space we cannot use u64 nor u32 and instead
> need to use phys_addr_t.
>
> Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue")
> Cc: Stefan Chulski <stefanc@marvell.com>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [U-Boot, 1/4] mvpp2: Fix warning over 32bit vs 64bit targets
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
` (4 preceding siblings ...)
2018-01-29 17:46 ` Joe Hershberger
@ 2018-01-29 20:20 ` Tom Rini
5 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-29 20:20 UTC (permalink / raw)
To: u-boot
On Sat, Jan 27, 2018 at 02:48:08PM -0500, Tom Rini wrote:
> When we have a driver that is used on both 32bit and 64bit targets and
> we are talking about address space we cannot use u64 nor u32 and instead
> need to use phys_addr_t.
>
> Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue")
> Cc: Stefan Chulski <stefanc@marvell.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180129/ef599123/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [U-Boot, v2, 3/4] fs: btrfs: Fix printf format character warning
2018-01-27 22:23 ` [U-Boot] [PATCH v2 " Tom Rini
2018-01-27 22:36 ` Marek Behun
@ 2018-01-29 20:21 ` Tom Rini
1 sibling, 0 replies; 19+ messages in thread
From: Tom Rini @ 2018-01-29 20:21 UTC (permalink / raw)
To: u-boot
On Sat, Jan 27, 2018 at 05:23:21PM -0500, Tom Rini wrote:
> When printing a size_t value we need to use %zu for portability between
> 32bit and 64bit targets.
>
> Cc: Marek Behún <marek.behun@nic.cz>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Marek Behun <marek.behun@nic.cz>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180129/d4f53f32/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2018-01-29 20:21 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-27 19:48 [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 2/4] usb: gadget: dwc2: " Tom Rini
2018-01-27 19:52 ` Marek Vasut
2018-01-27 19:56 ` Tom Rini
2018-01-27 20:09 ` Marek Vasut
2018-01-27 20:17 ` Dr. Philipp Tomsich
2018-01-27 20:31 ` Marek Vasut
2018-01-28 9:57 ` Lukasz Majewski
2018-01-27 19:48 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning Tom Rini
2018-01-27 22:17 ` Marek Behun
2018-01-27 22:23 ` [U-Boot] [PATCH v2 " Tom Rini
2018-01-27 22:36 ` Marek Behun
2018-01-29 20:21 ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-01-27 19:48 ` [U-Boot] [PATCH 4/4] usb: ehci-mxs: Fix argument order for ehci_writel() Tom Rini
2018-01-27 19:53 ` Marek Vasut
2018-01-27 19:53 ` Tom Rini
2018-01-29 7:15 ` [U-Boot] [PATCH 1/4] mvpp2: Fix warning over 32bit vs 64bit targets Stefan Roese
2018-01-29 17:46 ` Joe Hershberger
2018-01-29 20:20 ` [U-Boot] [U-Boot, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox