Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1524103 > unrolled thread
| Started by | Sergio Paracuellos <sergio.paracuellos@gmail.com> |
|---|---|
| First post | 2016-11-17 06:50 +0100 |
| Last post | 2016-11-17 06:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 2/2] staging: slicoss: fix different address space warnings: 64 bits Sergio Paracuellos <sergio.paracuellos@gmail.com> - 2016-11-17 06:50 +0100
| From | Sergio Paracuellos <sergio.paracuellos@gmail.com> |
|---|---|
| Date | 2016-11-17 06:50 +0100 |
| Subject | [PATCH v3 2/2] staging: slicoss: fix different address space warnings: 64 bits |
| Message-ID | <sEnK9-4VC-23@gated-at.bofh.it> |
This patch fix the following sparse warnings in slicoss driver:
warning: incorrect type in assignment (different address spaces)
This changes are for 64 bits.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
drivers/staging/slicoss/slic.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
index d637ab1..63637ba 100644
--- a/drivers/staging/slicoss/slic.h
+++ b/drivers/staging/slicoss/slic.h
@@ -540,6 +540,7 @@ static inline void slic_flush_write(struct adapter *adapter)
ioread32(adapter->regs + SLIC_REG_HOSTID);
}
+#if BITS_PER_LONG == 32
static inline u64 slic_ioread64(void __iomem *mmio)
{
u64 low, high;
@@ -548,6 +549,14 @@ static inline u64 slic_ioread64(void __iomem *mmio)
high = ioread32(mmio + sizeof(u32));
return low | (high << 32);
}
+#elif BITS_PER_LONG == 64
+static inline u64 slic_ioread64(void __iomem *mmio)
+{
+ return readq(mmio);
+}
+#else
+#error BITS_PER_LONG must be 32 or 64
+#endif
#define UPDATE_STATS(largestat, newstat, oldstat) \
{ \
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web