1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

remove unnecessary casts

This commit is contained in:
Ralph Metzler 2017-12-11 16:41:32 +01:00
parent d5bbd3a025
commit c75a7892d9
2 changed files with 13 additions and 13 deletions

View File

@ -39,7 +39,7 @@ u32 ddblreadl(struct ddb_link *link, u32 adr)
spin_unlock_irqrestore(&link->lock, flags); spin_unlock_irqrestore(&link->lock, flags);
return val; 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) 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); spin_unlock_irqrestore(&link->lock, flags);
return; return;
} }
writel(val, (char *)(link->dev->regs + (adr))); writel(val, link->dev->regs + adr);
} }
u32 ddbreadl(struct ddb *dev, u32 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); spin_unlock_irqrestore(&link->lock, flags);
return val; return val;
} }
return readl((char *)(dev->regs + (adr))); return readl(dev->regs + adr);
} }
void ddbwritel(struct ddb *dev, u32 val, u32 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); spin_unlock_irqrestore(&link->lock, flags);
return; return;
} }
writel(val, (char *)(dev->regs + (adr))); writel(val, dev->regs + adr);
} }
void gtlcpyto(struct ddb *dev, u32 adr, const u8 *buf, 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)) if (unlikely(adr & 0xf0000000))
return gtlcpyto(dev, adr, src, count); 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) void ddbcpyfrom(struct ddb *dev, void *dst, u32 adr, long count)
{ {
if (unlikely(adr & 0xf0000000)) if (unlikely(adr & 0xf0000000))
return gtlcpyfrom(dev, dst, adr, count); return gtlcpyfrom(dev, dst, adr, count);
return memcpy_fromio(dst, (char *)(dev->regs + adr), count); return memcpy_fromio(dst, dev->regs + adr, count);
} }

View File

@ -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) 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) 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) 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) 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) 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) 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 #if 0
@ -92,6 +92,6 @@ static inline void gtlw(struct ddb_link *link)
#endif #endif
#define ddbmemset(_dev, _adr, _val, _count) \ #define ddbmemset(_dev, _adr, _val, _count) \
memset_io((char *)((_dev)->regs + (_adr)), (_val), (_count)) memset_io(((_dev)->regs + (_adr)), (_val), (_count))
#endif #endif