From: Peng Sun <sironhide0null@gmail.com>
To: liodot@gmail.com, charrer@alacritech.com, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Peng Sun <sironhide0null@gmail.com>
Subject: [PATCH 09/10] staging: slicoss: slicoss.c: fix different address space sparse warning
Date: Tue, 13 Sep 2016 19:59:58 -0700 [thread overview]
Message-ID: <0076480d23a4ca406bddd98a58fc024a4c7ed370.1473821899.git.sironhide0null@gmail.com> (raw)
In-Reply-To: <cover.1473821899.git.sironhide0null@gmail.com>
In-Reply-To: <679c2fd03a90ca7104b081ed8c2f6dd68fb43eb7.1473821899.git.sironhide0null@gmail.com>
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
drivers/staging/slicoss/slicoss.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index a2d9c77..6ecf71c 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2230,7 +2230,7 @@ static int slic_if_init(struct adapter *adapter, unsigned long *flags)
struct sliccard *card = adapter->card;
struct net_device *dev = adapter->netdev;
struct slic_shmemory *sm = &adapter->shmem;
- struct slic_shmem_data *sm_data = sm->shmem_data;
+ struct slic_shmem_data __iomem *sm_data = sm->shmem_data;
int rc;
/* adapter should be down at this point */
@@ -2314,7 +2314,7 @@ static int slic_if_init(struct adapter *adapter, unsigned long *flags)
/*
* clear any pending events, then enable interrupts
*/
- sm_data->isr = 0;
+ IOMEM_SET_FIELD32(0, sm_data, isr);
slic_write32(adapter, SLIC_REG_ISR, 0);
slic_write32(adapter, SLIC_REG_ICR, ICR_INT_ON);
@@ -2603,7 +2603,7 @@ static void slic_config_pci(struct pci_dev *pcidev)
static int slic_card_init(struct sliccard *card, struct adapter *adapter)
{
struct slic_shmemory *sm = &adapter->shmem;
- struct slic_shmem_data *sm_data = sm->shmem_data;
+ struct slic_shmem_data __iomem *sm_data = sm->shmem_data;
struct slic_eeprom *peeprom;
struct oslic_eeprom *pOeeprom;
dma_addr_t phys_config;
@@ -2666,9 +2666,9 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
}
for (;;) {
- if (sm_data->isr) {
- if (sm_data->isr & ISR_UPC) {
- sm_data->isr = 0;
+ if (IOMEM_GET_FIELD32(sm_data, isr)) {
+ if (IOMEM_GET_FIELD32(sm_data, isr) & ISR_UPC) {
+ IOMEM_SET_FIELD32(0, sm_data, isr);
slic_write64(adapter, SLIC_REG_ISP, 0,
0);
slic_write32(adapter, SLIC_REG_ISR, 0);
@@ -2678,7 +2678,7 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
break;
}
- sm_data->isr = 0;
+ IOMEM_SET_FIELD32(0, sm_data, isr);
slic_write32(adapter, SLIC_REG_ISR, 0);
slic_flush_write(adapter);
} else {
--
2.7.4
next prev parent reply other threads:[~2016-09-14 3:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 2:59 [PATCH 00/10] staging: slicoss: fix different address space sparse warnings Peng Sun
2016-09-14 2:59 ` [PATCH 01/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELDADDR to fix " Peng Sun
2016-09-14 2:59 ` [PATCH 02/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELD32 " Peng Sun
2016-09-14 2:59 ` [PATCH 03/10] staging: slicoss: slic.h: add a macro IOMEM_SET_FIELD32 " Peng Sun
2016-09-14 2:59 ` [PATCH 04/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELD64 " Peng Sun
2016-09-14 2:59 ` [PATCH 05/10] staging: slicoss: slicoss.c: fix different address space sparse warning Peng Sun
2016-09-14 2:59 ` [PATCH 06/10] " Peng Sun
2016-09-14 2:59 ` [PATCH 07/10] " Peng Sun
2016-09-14 2:59 ` [PATCH 08/10] " Peng Sun
2016-09-14 2:59 ` Peng Sun [this message]
2016-09-14 2:59 ` [PATCH 10/10] " Peng Sun
2016-09-16 7:52 ` [PATCH 01/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELDADDR to fix sparse warnings Greg KH
2016-09-16 7:52 ` Greg KH
2016-09-16 10:41 ` zerons
2016-09-16 12:57 ` Greg KH
2016-09-16 13:54 ` zerons
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=0076480d23a4ca406bddd98a58fc024a4c7ed370.1473821899.git.sironhide0null@gmail.com \
--to=sironhide0null@gmail.com \
--cc=charrer@alacritech.com \
--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®