ixgbevf: change hw_dbg to use netdev_dbg
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 29 Jul 2016 17:30:11 +0000 (10:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 19 Aug 2016 05:45:20 +0000 (22:45 -0700)
Instead of the home brewed macro make use of netdev_dbg same as
the ixgbe driver.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index be52f597688b0a642c32db40307f3d5ae766de19..5639fbe294d0bbb1ae4fd46828d1c790353edf5d 100644 (file)
@@ -502,12 +502,9 @@ extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
 void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter);
 void ixgbe_napi_del_all(struct ixgbevf_adapter *adapter);
 
-#ifdef DEBUG
-char *ixgbevf_get_hw_dev_name(struct ixgbe_hw *hw);
-#define hw_dbg(hw, format, arg...) \
-       printk(KERN_DEBUG "%s: " format, ixgbevf_get_hw_dev_name(hw), ##arg)
-#else
-#define hw_dbg(hw, format, arg...) do {} while (0)
-#endif
+#define ixgbevf_hw_to_netdev(hw) \
+       (((struct ixgbevf_adapter *)(hw)->back)->netdev)
 
+#define hw_dbg(hw, format, arg...) \
+       netdev_dbg(ixgbevf_hw_to_netdev(hw), format, ## arg)
 #endif /* _IXGBEVF_H_ */
index d9d6616f02a4d97a214204344f3be8704d887f67..8d4f535b9e9248f114f3cb6f19ecfb66207e0451 100644 (file)
@@ -2993,6 +2993,7 @@ static void ixgbevf_free_all_tx_resources(struct ixgbevf_adapter *adapter)
  **/
 int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
 {
+       struct ixgbevf_adapter *adapter = netdev_priv(tx_ring->netdev);
        int size;
 
        size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;