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

Commit 453ca931 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller
Browse files

pch_gbe: convert pr_* to netdev_*



We may use nice macros to prefix our messages with proper device name.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd796809
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -633,6 +633,8 @@ struct pch_gbe_adapter {
	struct pci_dev *ptp_pdev;
};

#define pch_gbe_hw_to_adapter(hw)	container_of(hw, struct pch_gbe_adapter, hw)

extern const char pch_driver_version[];

/* pch_gbe_main.c */
+33 −16
Original line number Diff line number Diff line
@@ -71,7 +71,9 @@ static s32 pch_gbe_plat_init_hw(struct pch_gbe_hw *hw)

	ret_val = pch_gbe_phy_get_id(hw);
	if (ret_val) {
		pr_err("pch_gbe_phy_get_id error\n");
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "pch_gbe_phy_get_id error\n");
		return ret_val;
	}
	pch_gbe_phy_init_setting(hw);
@@ -116,7 +118,9 @@ static void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw)
{
	if (!hw->reg) {
		pr_err("ERROR: Registers not mapped\n");
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: Registers not mapped\n");
		return -ENOSYS;
	}
	pch_gbe_plat_init_function_pointers(hw);
@@ -129,9 +133,12 @@ s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw)
 */
void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw)
{
	if (!hw->func->get_bus_info)
		pr_err("ERROR: configuration\n");
	else
	if (!hw->func->get_bus_info) {
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: configuration\n");
		return;
	}
	hw->func->get_bus_info(hw);
}

@@ -145,7 +152,9 @@ void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw)
{
	if (!hw->func->init_hw) {
		pr_err("ERROR: configuration\n");
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: configuration\n");
		return -ENOSYS;
	}
	return hw->func->init_hw(hw);
@@ -191,9 +200,12 @@ s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset,
 */
void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw)
{
	if (!hw->func->reset_phy)
		pr_err("ERROR: configuration\n");
	else
	if (!hw->func->reset_phy) {
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: configuration\n");
		return;
	}
	hw->func->reset_phy(hw);
}

@@ -203,9 +215,12 @@ void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw)
 */
void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw)
{
	if (!hw->func->sw_reset_phy)
		pr_err("ERROR: configuration\n");
	else
	if (!hw->func->sw_reset_phy) {
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: configuration\n");
		return;
	}
	hw->func->sw_reset_phy(hw);
}

@@ -219,7 +234,9 @@ void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw)
{
	if (!hw->func->read_mac_addr) {
		pr_err("ERROR: configuration\n");
		struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);

		netdev_err(adapter->netdev, "ERROR: configuration\n");
		return -ENOSYS;
	}
	return hw->func->read_mac_addr(hw);
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static int pch_gbe_set_settings(struct net_device *netdev,
	}
	ret = mii_ethtool_sset(&adapter->mii, ecmd);
	if (ret) {
		pr_err("Error: mii_ethtool_sset\n");
		netdev_err(netdev, "Error: mii_ethtool_sset\n");
		return ret;
	}
	hw->mac.link_speed = speed;
+159 −116

File changed.

Preview size limit exceeded, changes collapsed.

+40 −23

File changed.

Preview size limit exceeded, changes collapsed.

Loading