net: bgmac: Couple of sparse warnings
cover net: bgmac: Couple of sparse warnings
Hi all,
This patch series fixes a couple of warnings reported by sparse, should not cause any functional problems since bgmac is typically used on LE platforms anyway.
Florian Fainelli (2):
net: bgmac: Correctly annotate register space
net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
drivers/net/ethernet/broadcom/bgmac.c | 3 ++- drivers/net/ethernet/broadcom/bgmac.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.14.1
PATCH 1/2 net: bgmac: Correctly annotate register space
All the members: base, idm_base and nicpm_base should be annotated with __iomem since they are pointers to register space. This fixes a bunch of sparse reported warnings.
--- drivers/net/ethernet/broadcom/bgmac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bgmac.h +3 -3
@@ -479,9 +479,9 @@ struct bgmac_rx_header { struct bgmac { union { struct { - void *base; - void *idm_base; - void *nicpm_base; + void __iomem *base; + void __iomem *idm_base; + void __iomem *nicpm_base; } plat; struct { struct bcma_device *core;
Signature · 1 line
2.14.1
Re: [PATCH net 1/2] net: bgmac: Correctly annotate register space
Hi Florian Fainelli.
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag. fixing commit: f6a95a24957a net: ethernet: bgmac: Add platform device support.
The bot has also determined it's probably a bug fixing patch. (score: 67.8237)
The bot has tested the following trees: v4.15.15, v4.14.32, v4.9.92,
v4.15.15: Build OK!
v4.14.32: Build OK!
v4.9.92: Failed to apply! Possible dependencies:
dd5c5d037f5e: ("net: ethernet: bgmac: add NS2 support") 1676aba5ef7e: ("net: ethernet: bgmac: device tree phy enablement")
PATCH 2/2 net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
In reply to Florian Fainellibgmac_dma_tx_ring_free() assigns the ctl1 word which is a litle endian 32-bit word without using proper accessors, fix this, and because a length cannot be negative, use unsigned int while at it.
--- drivers/net/ethernet/broadcom/bgmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bgmac.c +2 -1
@@ -533,7 +533,8 @@ static void bgmac_dma_tx_ring_free(struct bgmac *bgmac,int i;for (i =0 ; i <BGMAC_TX_RING_SLOTS ; i++) { -int len = dma_desc[i].ctl1 &BGMAC_DESC_CTL1_LEN ; +u32 ctl1 =le32_to_cpu (dma_desc[i].ctl1); +unsigned int len = ctl1 &BGMAC_DESC_CTL1_LEN ; slot = &ring->slots[i];dev_kfree_skb (slot->skb);
Signature · 1 line
2.14.1
Re: [PATCH net 2/2] net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
Hi Florian Fainelli.
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag. fixing commit: 9cde94506eac bgmac: implement scatter/gather support.
The bot has also determined it's probably a bug fixing patch. (score: 45.9160)
The bot has tested the following trees: v4.15.15, v4.14.32, v4.9.92, v4.4.126,
v4.15.15: Build OK!
v4.14.32: Build OK!
v4.9.92: Build OK!
v4.4.126: Build OK!
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Sun, 1 Apr 2018 10:26:28 -0700
Quoted 3 lines
This patch series fixes a couple of warnings reported by sparse, should not cause any functional problems since bgmac is typically used on LE platforms anyway.
Series applied, thanks Florian.
Quoted 8 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Sun, 1 Apr 2018 10:26:28 -0700Quoted 3 lines
This patch series fixes a couple of warnings reported by sparse, should not cause any functional problems since bgmac is typically used on LE platforms anyway.
Series applied, thanks Florian.
I did not see this in net/master or included in your recent pull request to Linus, not a big deal, but I just want to make sure this is not lost somewhere ;)
Signature · 1 line
Florian
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Mon, 2 Apr 2018 10:17:36 -0700
Quoted 8 lines · David Miller
Quoted 7 lines
From: Florian Fainelli <[email protected]>
Date: Sun, 1 Apr 2018 10:26:28 -0700Quoted 3 lines
This patch series fixes a couple of warnings reported by sparse, should not cause any functional problems since bgmac is typically used on LE platforms anyway.
Quoted 5 lines
Quoted 1 line
Series applied, thanks Florian.
I did not see this in net/master or included in your recent pull request to Linus, not a big deal, but I just want to make sure this is not lost somewhere ;)
All changes go into net-next as I prepare for a merge window pull request.