Thread (7 messages) 7 messages, 3 authors, 2013-06-27

Re: [PATCH v1 2/3] pch_gbe: convert pr_* to netdev_*

From: Joe Perches <joe@perches.com>
Date: 2013-06-27 00:59:32

On Wed, 2013-06-26 at 19:13 +0300, Andy Shevchenko wrote:
We may use nice macros to prefix our messages with proper device name.
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
[]
quoted hunk ↗ jump to hunk
@@ -131,10 +133,12 @@ s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw)
  */
 s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data)
 {
+	struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
 	struct pch_gbe_phy_info *phy = &hw->phy;
 
 	if (offset > PHY_MAX_REG_ADDRESS) {
-		pr_err("PHY Address %d is out of range\n", offset);
+		netdev_err(adapter->netdev, "PHY Address %d is out of range\n",
+			   offset);
For all the patch blocks in this set, I suggest taking
these reverences only when necessary.

Assigning them at the beginning of the function seems
wasteful when these may not be used at all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help