From: Al Viro <viro@ftp.linux.org.uk>
To: netdev@vger.kernel.org
Cc: <peppe.cavallaro@st.com>,
Cavallaro@ftp.linux.org.uk, Giuseppe@ftp.linux.org.uk
Subject: Subject: [RFC][PATCH 03/11] stmmac: trivial sparse annotations
Date: Fri, 05 Jan 2018 19:31:48 +0000 [thread overview]
Message-ID: <E1eXXiW-0002AD-I2@ZenIV.linux.org.uk> (raw)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 85ce80c600c7..b069a3d99356 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -20,18 +20,18 @@
#define GMAC_CONFIG_INTF_RGMII (0x1 << 0)
struct anarion_gmac {
- uintptr_t ctl_block;
+ void __iomem *ctl_block;
uint32_t phy_intf_sel;
};
static uint32_t gmac_read_reg(struct anarion_gmac *gmac, uint8_t reg)
{
- return readl((void *)(gmac->ctl_block + reg));
+ return readl(gmac->ctl_block + reg);
};
static void gmac_write_reg(struct anarion_gmac *gmac, uint8_t reg, uint32_t val)
{
- writel(val, (void *)(gmac->ctl_block + reg));
+ writel(val, gmac->ctl_block + reg);
}
static int anarion_gmac_init(struct platform_device *pdev, void *priv)
@@ -71,14 +71,14 @@ static struct anarion_gmac *anarion_config_dt(struct platform_device *pdev)
if (IS_ERR(ctl_block)) {
dev_err(&pdev->dev, "Cannot get reset region (%ld)!\n",
PTR_ERR(ctl_block));
- return ctl_block;
+ return ERR_CAST(ctl_block);
}
gmac = devm_kzalloc(&pdev->dev, sizeof(*gmac), GFP_KERNEL);
if (!gmac)
return ERR_PTR(-ENOMEM);
- gmac->ctl_block = (uintptr_t)ctl_block;
+ gmac->ctl_block = ctl_block;
phy_mode = of_get_phy_mode(pdev->dev.of_node);
switch (phy_mode) {
--
2.11.0
reply other threads:[~2018-01-05 19:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1eXXiW-0002AD-I2@ZenIV.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=Cavallaro@ftp.linux.org.uk \
--cc=Giuseppe@ftp.linux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).