enic: use netdev_<foo> or dev_<foo> instead of pr_<foo>

pr_info does not give any details about the interface involved. This patch
uses netdev_info for printing the message. Use dev_info where netdev is not
ready.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Govindarajulu Varadarajan
2015-08-16 01:44:52 +05:30
committed by David S. Miller
parent 8b89f3a19d
commit 6a3c2f838c
6 changed files with 54 additions and 31 deletions

View File

@@ -191,6 +191,25 @@ struct enic {
struct vnic_gen_stats gen_stats;
};
static inline struct net_device *vnic_get_netdev(struct vnic_dev *vdev)
{
struct enic *enic = vdev->priv;
return enic->netdev;
}
/* wrappers function for kernel log
* Make sure variable vdev of struct vnic_dev is available in the block where
* these macros are used
*/
#define vdev_info(args...) dev_info(&vdev->pdev->dev, args)
#define vdev_warn(args...) dev_warn(&vdev->pdev->dev, args)
#define vdev_err(args...) dev_err(&vdev->pdev->dev, args)
#define vdev_netinfo(args...) netdev_info(vnic_get_netdev(vdev), args)
#define vdev_netwarn(args...) netdev_warn(vnic_get_netdev(vdev), args)
#define vdev_neterr(args...) netdev_err(vnic_get_netdev(vdev), args)
static inline struct device *enic_get_dev(struct enic *enic)
{
return &(enic->pdev->dev);