diff options
author | Govindarajulu Varadarajan <_govind@gmx.com> | 2015-08-16 01:44:52 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-17 15:25:29 -0700 |
commit | 6a3c2f838c69406688ed0dbae473c3a08eeb5519 (patch) | |
tree | 3203ff3deaaff3f4571f1950bd176db34903feda /drivers/net/ethernet/cisco/enic/enic.h | |
parent | 8b89f3a19de05992a70f727072b65f3ea1397075 (diff) | |
download | linux-6a3c2f838c69406688ed0dbae473c3a08eeb5519.tar.gz linux-6a3c2f838c69406688ed0dbae473c3a08eeb5519.tar.bz2 linux-6a3c2f838c69406688ed0dbae473c3a08eeb5519.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/enic.h')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/enic.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h index 84b6a2b46aec..1f8f333aa3df 100644 --- a/drivers/net/ethernet/cisco/enic/enic.h +++ b/drivers/net/ethernet/cisco/enic/enic.h @@ -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); |