* [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup
@ 2013-12-11 23:51 Olof Johansson
2013-12-11 23:51 ` [PATCH 2/2] net: eth: davinci_cpdma: Mark a local variable static Olof Johansson
2013-12-12 0:54 ` [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Olof Johansson @ 2013-12-11 23:51 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, linux-omap, Olof Johansson
Silences the below warnings when building with ARM_LPAE enabled, which
gives longer dma_addr_t by default:
drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create':
drivers/net/ethernet/ti/davinci_cpdma.c:182:3: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type [enabled by default]
drivers/net/ethernet/ti/davinci_cpdma.c: In function 'desc_phys':
drivers/net/ethernet/ti/davinci_cpdma.c:222:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/net/ethernet/ti/davinci_cpdma.c:223:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Olof Johansson <olof@lixom.net>
---
drivers/net/ethernet/ti/davinci_cpdma.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index 90a7946..b041a87 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -81,7 +81,7 @@ struct cpdma_desc {
};
struct cpdma_desc_pool {
- u32 phys;
+ phys_addr_t phys;
u32 hw_addr;
void __iomem *iomap; /* ioremap map */
void *cpumap; /* dma_alloc map */
@@ -219,8 +219,7 @@ static inline dma_addr_t desc_phys(struct cpdma_desc_pool *pool,
{
if (!desc)
return 0;
- return pool->hw_addr + (__force dma_addr_t)desc -
- (__force dma_addr_t)pool->iomap;
+ return pool->hw_addr + (__force long)desc - (__force long)pool->iomap;
}
static inline struct cpdma_desc __iomem *
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] net: eth: davinci_cpdma: Mark a local variable static
2013-12-11 23:51 [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup Olof Johansson
@ 2013-12-11 23:51 ` Olof Johansson
2013-12-12 0:54 ` David Miller
2013-12-12 0:54 ` [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2013-12-11 23:51 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, linux-omap, Olof Johansson
Only used locally. Found by sparse.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
drivers/net/ethernet/ti/davinci_cpdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index b041a87..364d0c7 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -971,7 +971,7 @@ struct cpdma_control_info {
#define ACCESS_RW (ACCESS_RO | ACCESS_WO)
};
-struct cpdma_control_info controls[] = {
+static struct cpdma_control_info controls[] = {
[CPDMA_CMD_IDLE] = {CPDMA_DMACONTROL, 3, 1, ACCESS_WO},
[CPDMA_COPY_ERROR_FRAMES] = {CPDMA_DMACONTROL, 4, 1, ACCESS_RW},
[CPDMA_RX_OFF_LEN_UPDATE] = {CPDMA_DMACONTROL, 2, 1, ACCESS_RW},
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup
2013-12-11 23:51 [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup Olof Johansson
2013-12-11 23:51 ` [PATCH 2/2] net: eth: davinci_cpdma: Mark a local variable static Olof Johansson
@ 2013-12-12 0:54 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-12-12 0:54 UTC (permalink / raw)
To: olof; +Cc: netdev, linux-kernel, linux-omap
From: Olof Johansson <olof@lixom.net>
Date: Wed, 11 Dec 2013 15:51:20 -0800
> Silences the below warnings when building with ARM_LPAE enabled, which
> gives longer dma_addr_t by default:
>
> drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create':
> drivers/net/ethernet/ti/davinci_cpdma.c:182:3: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type [enabled by default]
> drivers/net/ethernet/ti/davinci_cpdma.c: In function 'desc_phys':
> drivers/net/ethernet/ti/davinci_cpdma.c:222:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/net/ethernet/ti/davinci_cpdma.c:223:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-12 0:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 23:51 [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup Olof Johansson
2013-12-11 23:51 ` [PATCH 2/2] net: eth: davinci_cpdma: Mark a local variable static Olof Johansson
2013-12-12 0:54 ` David Miller
2013-12-12 0:54 ` [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).