[U-Boot] [PATCH 2/8] net/ethoc: fix warnings from ethoc_read/ethoc_write

Max Filippov jcmvbkbc at gmail.com
Wed Aug 20 19:42:07 CEST 2014


There's no need to use loff_t to specify in-memory offset; size_t is
smaller and is guaranteed to be sufficient to represent any memory
object size.

Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
---
 drivers/net/ethoc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 46b9bae..9362faf 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -189,12 +189,12 @@ struct ethoc_bd {
 	u32 addr;
 };
 
-static inline u32 ethoc_read(struct eth_device *dev, loff_t offset)
+static inline u32 ethoc_read(struct eth_device *dev, size_t offset)
 {
 	return readl(dev->iobase + offset);
 }
 
-static inline void ethoc_write(struct eth_device *dev, loff_t offset, u32 data)
+static inline void ethoc_write(struct eth_device *dev, size_t offset, u32 data)
 {
 	writel(data, dev->iobase + offset);
 }
-- 
1.8.1.4



More information about the U-Boot mailing list