From c75a7892d978f85da5dbf4e2417c224657006d37 Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Mon, 11 Dec 2017 16:41:32 +0100 Subject: [PATCH] remove unnecessary casts --- ddbridge/ddbridge-io.c | 12 ++++++------ ddbridge/ddbridge-io.h | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ddbridge/ddbridge-io.c b/ddbridge/ddbridge-io.c index 0e26a7d..d96d080 100644 --- a/ddbridge/ddbridge-io.c +++ b/ddbridge/ddbridge-io.c @@ -39,7 +39,7 @@ u32 ddblreadl(struct ddb_link *link, u32 adr) spin_unlock_irqrestore(&link->lock, flags); return val; } - return readl((char *)(link->dev->regs + (adr))); + return readl(link->dev->regs + adr); } void ddblwritel(struct ddb_link *link, u32 val, u32 adr) @@ -55,7 +55,7 @@ void ddblwritel(struct ddb_link *link, u32 val, u32 adr) spin_unlock_irqrestore(&link->lock, flags); return; } - writel(val, (char *)(link->dev->regs + (adr))); + writel(val, link->dev->regs + adr); } u32 ddbreadl(struct ddb *dev, u32 adr) @@ -74,7 +74,7 @@ u32 ddbreadl(struct ddb *dev, u32 adr) spin_unlock_irqrestore(&link->lock, flags); return val; } - return readl((char *)(dev->regs + (adr))); + return readl(dev->regs + adr); } void ddbwritel(struct ddb *dev, u32 val, u32 adr) @@ -92,7 +92,7 @@ void ddbwritel(struct ddb *dev, u32 val, u32 adr) spin_unlock_irqrestore(&link->lock, flags); return; } - writel(val, (char *)(dev->regs + (adr))); + writel(val, dev->regs + adr); } void gtlcpyto(struct ddb *dev, u32 adr, const u8 *buf, @@ -167,12 +167,12 @@ void ddbcpyto(struct ddb *dev, u32 adr, void *src, long count) { if (unlikely(adr & 0xf0000000)) return gtlcpyto(dev, adr, src, count); - return memcpy_toio((char *)(dev->regs + adr), src, count); + return memcpy_toio(dev->regs + adr, src, count); } void ddbcpyfrom(struct ddb *dev, void *dst, u32 adr, long count) { if (unlikely(adr & 0xf0000000)) return gtlcpyfrom(dev, dst, adr, count); - return memcpy_fromio(dst, (char *)(dev->regs + adr), count); + return memcpy_fromio(dst, dev->regs + adr, count); } diff --git a/ddbridge/ddbridge-io.h b/ddbridge/ddbridge-io.h index baff5cc..7626ff8 100644 --- a/ddbridge/ddbridge-io.h +++ b/ddbridge/ddbridge-io.h @@ -36,32 +36,32 @@ void ddbcpyfrom(struct ddb *dev, void *dst, u32 adr, long count); static inline void ddbwriteb0(struct ddb *dev, u32 val, u32 adr) { - writeb(val, (char *)(dev->regs + (adr))); + writeb(val, dev->regs + adr); } static inline u32 ddbreadb0(struct ddb *dev, u32 adr) { - return readb((char *)(dev->regs + (adr))); + return readb(dev->regs + adr); } static inline void ddbwritel0(struct ddb *dev, u32 val, u32 adr) { - writel(val, (char *)(dev->regs + (adr))); + writel(val, dev->regs + adr); } static inline u32 ddbreadl0(struct ddb *dev, u32 adr) { - return readl((char *)(dev->regs + (adr))); + return readl(dev->regs + adr); } static inline void ddblwritel0(struct ddb_link *link, u32 val, u32 adr) { - writel(val, (char *)(link->dev->regs + (adr))); + writel(val, link->dev->regs + adr); } static inline u32 ddblreadl0(struct ddb_link *link, u32 adr) { - return readl((char *)(link->dev->regs + (adr))); + return readl(link->dev->regs + adr); } #if 0 @@ -92,6 +92,6 @@ static inline void gtlw(struct ddb_link *link) #endif #define ddbmemset(_dev, _adr, _val, _count) \ - memset_io((char *)((_dev)->regs + (_adr)), (_val), (_count)) + memset_io(((_dev)->regs + (_adr)), (_val), (_count)) #endif