Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2154c704 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

r6040: fix all checkpatch errors and warnings



This patch fixes a couple of errors and warnings spotted by checkpatch.pl:
- some lines were over 80 columns
- there were some whitespaces left

The call to printk is now replaced by a call to pr_info and the log-level
included in the driver version is now removed, so there are no longer false
positives on this warning.

Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7136e11e
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ struct r6040_private {
	int old_duplex;
};

static char version[] __devinitdata = KERN_INFO DRV_NAME
static char version[] __devinitdata = DRV_NAME
	": RDC R6040 NAPI net driver,"
	"version "DRV_VERSION " (" DRV_RELDATE ")";

@@ -224,7 +224,8 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
}

/* Write a word data from PHY Chip */
static void r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val)
static void r6040_phy_write(void __iomem *ioaddr,
					int phy_addr, int reg, u16 val)
{
	int limit = 2048;
	u16 cmd;
@@ -491,12 +492,14 @@ static int r6040_close(struct net_device *dev)

	/* Free Descriptor memory */
	if (lp->rx_ring) {
		pci_free_consistent(pdev, RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
		pci_free_consistent(pdev,
				RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
		lp->rx_ring = NULL;
	}

	if (lp->tx_ring) {
		pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
		pci_free_consistent(pdev,
				TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
		lp->tx_ring = NULL;
	}

@@ -710,8 +713,10 @@ static int r6040_up(struct net_device *dev)
		return ret;

	/* improve performance (by RDC guys) */
	r6040_phy_write(ioaddr, 30, 17, (r6040_phy_read(ioaddr, 30, 17) | 0x4000));
	r6040_phy_write(ioaddr, 30, 17, ~((~r6040_phy_read(ioaddr, 30, 17)) | 0x2000));
	r6040_phy_write(ioaddr, 30, 17,
			(r6040_phy_read(ioaddr, 30, 17) | 0x4000));
	r6040_phy_write(ioaddr, 30, 17,
			~((~r6040_phy_read(ioaddr, 30, 17)) | 0x2000));
	r6040_phy_write(ioaddr, 0, 19, 0x0000);
	r6040_phy_write(ioaddr, 0, 30, 0x01F0);

@@ -1039,7 +1044,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
	u16 *adrp;
	int i;

	printk("%s\n", version);
	pr_info("%s\n", version);

	err = pci_enable_device(pdev);
	if (err)
@@ -1113,7 +1118,8 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
	/* Some bootloader/BIOSes do not initialize
	 * MAC address, warn about that */
	if (!(adrp[0] || adrp[1] || adrp[2])) {
		netdev_warn(dev, "MAC address not initialized, generating random\n");
		netdev_warn(dev, "MAC address not initialized, "
					"generating random\n");
		random_ether_addr(dev->dev_addr);
	}