All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Einon <mark.einon@gmail.com>
To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com
Cc: davem@davemloft.net, sfr@canb.auug.org.au,
	netdev@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Mark Einon <mark.einon@gmail.com>
Subject: [PATCH] staging: et131x: Fix all sparse warnings
Date: Sat, 19 Jan 2013 11:48:29 +0000	[thread overview]
Message-ID: <1358596109-30106-1-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <20130119110328.GO4584@mwanda>

Dan Carpenter has pointed out that there are several sparse warnings
from et131x.c, listed below. This patch fixes all these errors.

drivers/staging/et131x/et131x.c:1870:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1870:33:    expected unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1870:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1871:37: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1871:37:    expected unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1871:37:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1872:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1872:33:    expected unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:1872:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1873:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1873:33:    expected unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1873:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1874:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1874:33:    expected unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1874:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1876:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1876:33:    expected unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1876:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1877:37: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1877:37:    expected unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1877:37:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1878:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1878:33:    expected unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:1878:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1879:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1879:33:    expected unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1879:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1880:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1880:33:    expected unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1880:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1898:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1898:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1898:24:    got unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1900:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1900:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1900:24:    got unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1901:60: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1901:60:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1901:60:    got unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1902:39: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1902:39:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1902:39:    got unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1910:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1910:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1910:24:    got unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:2583:32: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:2583:32:    expected unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:2583:32:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:2585:32: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:2585:32:    expected unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:2585:32:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:2602:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:2602:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:2602:24:    got unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:4093:13: warning: symbol 'et131x_isr' was not declared. Should it be static?

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et131x.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 82508fb..f0bc7ba 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1860,11 +1860,11 @@ static void et131x_config_rx_dma_regs(struct et131x_adapter *adapter)
 	rx_local->local_psr_full = 0;
 
 	for (id = 0; id < NUM_FBRS; id++) {
-		u32 *num_des;
-		u32 *full_offset;
-		u32 *min_des;
-		u32 *base_hi;
-		u32 *base_lo;
+		u32 __iomem *num_des;
+		u32 __iomem *full_offset;
+		u32 __iomem *min_des;
+		u32 __iomem *base_hi;
+		u32 __iomem *base_lo;
 
 		if (id == 0) {
 			num_des = &rx_dma->fbr0_num_des;
@@ -2574,7 +2574,7 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd)
 	 * need to clean up OOB data
 	 */
 	if (buff_index < rx_local->fbr[ring_index]->num_entries) {
-		u32 *offset;
+		u32 __iomem *offset;
 		struct fbr_desc *next;
 
 		spin_lock_irqsave(&adapter->fbr_lock, flags);
@@ -4090,7 +4090,7 @@ static SIMPLE_DEV_PM_OPS(et131x_pm_ops, et131x_suspend, et131x_resume);
  *
  * Returns a value indicating if the interrupt was handled.
  */
-irqreturn_t et131x_isr(int irq, void *dev_id)
+static irqreturn_t et131x_isr(int irq, void *dev_id)
 {
 	bool handled = true;
 	struct net_device *netdev = (struct net_device *)dev_id;
-- 
1.7.9.5


  reply	other threads:[~2013-01-19 11:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 20:40 [RFC PATCH linux-next] et131x: Promote staging et131x driver to drivers/net Mark Einon
2013-01-18 22:57 ` Greg KH
2013-01-19 11:03   ` Dan Carpenter
2013-01-19 11:48     ` Mark Einon [this message]
2013-01-21 23:44     ` Mark Einon
2013-01-22  6:20       ` Dan Carpenter
2013-01-23 10:10 ` [RFC PATCH v2 " Mark Einon
2013-01-23 10:31   ` Dan Carpenter
2013-01-23 11:31     ` Mark Einon
2013-01-23 12:45   ` [RFC PATCH v3 " Mark Einon
2013-01-23 14:32     ` Greg KH
2013-01-23 14:51       ` Mark Einon
2013-01-23 16:24     ` [RFC PATCH v4 " Mark Einon
2013-01-29  4:10       ` David Miller
2013-01-29 12:47         ` Mark Einon

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=1358596109-30106-1-git-send-email-mark.einon@gmail.com \
    --to=mark.einon@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.