From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
liodot@gmail.com, charrer@alacritech.com
Subject: [PATCH v3 2/2] staging: slicoss: fix different address space warnings: 64 bits
Date: Thu, 17 Nov 2016 06:42:28 +0100 [thread overview]
Message-ID: <1479361348-7348-3-git-send-email-sergio.paracuellos@gmail.com> (raw)
In-Reply-To: <1479361348-7348-1-git-send-email-sergio.paracuellos@gmail.com>
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
prev parent reply other threads:[~2016-11-17 5:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 5:42 [PATCH v3 0/2] staging: slicoss: fix different address space warnings Sergio Paracuellos
2016-11-17 5:42 ` [PATCH v3 1/2] staging: slicoss: fix different address space warnings: 32 bits Sergio Paracuellos
2016-11-17 10:51 ` Dan Carpenter
2016-11-17 11:22 ` Sergio Paracuellos
2016-11-17 11:33 ` Dan Carpenter
2016-11-17 11:46 ` Sergio Paracuellos
2016-11-18 7:45 ` Greg KH
2016-11-17 5:42 ` Sergio Paracuellos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479361348-7348-3-git-send-email-sergio.paracuellos@gmail.com \
--to=sergio.paracuellos@gmail.com \
--cc=charrer@alacritech.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liodot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®