From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757954AbaEKH4L (ORCPT ); Sun, 11 May 2014 03:56:11 -0400 Received: from smtp.newterm.pl ([79.187.237.18]:44163 "EHLO apollo.newterm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756798AbaEKH4D (ORCPT ); Sun, 11 May 2014 03:56:03 -0400 Date: Sun, 11 May 2014 09:56:08 +0200 From: Darek Marcinkiewicz To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] driver/net/ethernet/ec_bhf.c: fix sparse warnings Message-ID: <20140511075608.GA9034@newterm.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse was reporting quite a few warnings for the driver. Those get fixed by this patch. --- drivers/net/ethernet/ec_bhf.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c index 4884205..056b44b 100644 --- a/drivers/net/ethernet/ec_bhf.c +++ b/drivers/net/ethernet/ec_bhf.c @@ -134,17 +134,17 @@ struct ec_bhf_priv { struct pci_dev *dev; - void * __iomem io; - void * __iomem dma_io; + void __iomem *io; + void __iomem *dma_io; struct hrtimer hrtimer; int tx_dma_chan; int rx_dma_chan; - void * __iomem ec_io; - void * __iomem fifo_io; - void * __iomem mii_io; - void * __iomem mac_io; + void __iomem *ec_io; + void __iomem *fifo_io; + void __iomem *mii_io; + void __iomem *mac_io; struct bhf_dma rx_buf; struct rx_desc *rx_descs; @@ -297,7 +297,7 @@ static int ec_bhf_setup_offsets(struct ec_bhf_priv *priv) { struct device *dev = PRIV_TO_DEV(priv); unsigned block_count, i; - void * __iomem ec_info; + void __iomem *ec_info; dev_dbg(dev, "Info block:\n"); dev_dbg(dev, "Type of function: %x\n", (unsigned)ioread16(priv->io)); @@ -569,8 +569,8 @@ static int ec_bhf_probe(struct pci_dev *dev, const struct pci_device_id *id) { struct net_device *net_dev; struct ec_bhf_priv *priv; - void * __iomem dma_io; - void * __iomem io; + void __iomem *dma_io; + void __iomem *io; int err = 0; err = pci_enable_device(dev); @@ -615,7 +615,7 @@ static int ec_bhf_probe(struct pci_dev *dev, const struct pci_device_id *id) } net_dev = alloc_etherdev(sizeof(struct ec_bhf_priv)); - if (net_dev == 0) { + if (net_dev == NULL) { err = -ENOMEM; goto err_unmap_dma_io; } -- 1.7.10.4