Re: [PATCH] staging/et131x: fix checkpatch warnings

From: Joe Perches
Date: Tue Jul 17 2012 - 21:16:26 EST


On Wed, 2012-07-18 at 10:02 +0900, Toshiaki Yamane wrote:
> Signed-off-by: Toshiaki Yamane <yamanetoshi@xxxxxxxxx>

Hello. Just some trivial notes:

> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
[]
> @@ -2553,8 +2555,8 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
[]
> - printk(KERN_INFO "Packet Status Ring %lx\n",
> - (unsigned long) rx_ring->ps_ring_physaddr);
> + pr_info("Packet Status Ring %lx\n",
> + (unsigned long) rx_ring->ps_ring_physaddr);
> @@ -2574,7 +2576,7 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
[]
> - printk(KERN_INFO "PRS %lx\n", (unsigned long)rx_ring->rx_status_bus);
> + pr_info("PRS %lx\n", (unsigned long)rx_ring->rx_status_bus);

These might as well use %p without a cast to unsigned long
pr_info("Packet Status Ring: %p\n", rx_ring->ps_ring_phydaddr);
[]
pr_info("PRS: %p\n", rx_ring->rx_status_bus);

[]
> @@ -5186,8 +5188,8 @@ static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
[]
> - printk(KERN_INFO "%s: Setting MAC address to %pM\n",
> - netdev->name, netdev->dev_addr);
> + pr_info("%s: Setting MAC address to %pM\n",
> + netdev->name, netdev->dev_addr);

Please use netdev_<level> when there is a
struct net_device * available.

netdev_info(netdev, "Setting MAC address to %pM\n", netdev->dev_addr);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/