Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482899

[PATCH 09/10] staging: slicoss: slicoss.c: fix different address space sparse warning

From Peng Sun <sironhide0null@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 09/10] staging: slicoss: slicoss.c: fix different address space sparse warning
Date 2016-09-14 05:10 +0200
Message-ID <sh8Kd-2KP-25@gated-at.bofh.it> (permalink)
References <sh8Kd-2KP-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] staging: slicoss: fix different address space sparse warnings Peng Sun <sironhide0null@gmail.com> - 2016-09-14 05:10 +0200
  [PATCH 05/10] staging: slicoss: slicoss.c: fix different address space sparse warning Peng Sun <sironhide0null@gmail.com> - 2016-09-14 05:10 +0200
  [PATCH 01/10] staging: slicoss: slic.h: add a macro IOMEM_GET_FIELDADDR to fix sparse warnings Peng Sun <sironhide0null@gmail.com> - 2016-09-14 05:10 +0200
    Re: [PATCH 01/10] staging: slicoss: slic.h: add a macro  IOMEM_GET_FIELDADDR to fix sparse warnings Greg KH <gregkh@linuxfoundation.org> - 2016-09-16 10:00 +0200
    Re: [PATCH 01/10] staging: slicoss: slic.h: add a macro  IOMEM_GET_FIELDADDR to fix sparse warnings Greg KH <gregkh@linuxfoundation.org> - 2016-09-16 10:00 +0200
      Re: [PATCH 01/10] staging: slicoss: slic.h: add a macro  IOMEM_GET_FIELDADDR to fix sparse warnings zerons <sironhide0null@gmail.com> - 2016-09-16 12:50 +0200
        Re: [PATCH 01/10] staging: slicoss: slic.h: add a macro  IOMEM_GET_FIELDADDR to fix sparse warnings Greg KH <gregkh@linuxfoundation.org> - 2016-09-16 15:00 +0200
          Re: [PATCH 01/10] staging: slicoss: slic.h: add a macro  IOMEM_GET_FIELDADDR to fix sparse warnings zerons <sironhide0null@gmail.com> - 2016-09-16 16:00 +0200
  [PATCH 09/10] staging: slicoss: slicoss.c: fix different address space sparse warning Peng Sun <sironhide0null@gmail.com> - 2016-09-14 05:10 +0200
  [PATCH 03/10] staging: slicoss: slic.h: add a macro IOMEM_SET_FIELD32 to fix sparse warnings Peng Sun <sironhide0null@gmail.com> - 2016-09-14 05:10 +0200

csiph-web