lkml.org 
[lkml]   [2016]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELD32 to fix sparse warnings
Date
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
drivers/staging/slicoss/slic.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
index 7c23190..ff71070 100644
--- a/drivers/staging/slicoss/slic.h
+++ b/drivers/staging/slicoss/slic.h
@@ -546,6 +546,13 @@ static inline void slic_flush_write(struct adapter *adapter)
(void __iomem *)_base; \
})

+#define IOMEM_GET_FIELD32(base, member) \
+({ \
+ char __iomem *_base = (char __iomem *)base; \
+ _base += offsetof(typeof(*base), member); \
+ ioread32(_base); \
+})
+
#define UPDATE_STATS(largestat, newstat, oldstat) \
{ \
if ((newstat) < (oldstat)) \
--
2.7.4
\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.069 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site