netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Darren Hart <dvhart@linux.intel.com>
Subject: Re: [PATCH v1 2/3] pch_gbe: convert pr_* to netdev_*
Date: Wed, 26 Jun 2013 17:59:30 -0700	[thread overview]
Message-ID: <1372294770.2172.22.camel@joe-AO722> (raw)
In-Reply-To: <1372263217-1938-3-git-send-email-andriy.shevchenko@linux.intel.com>

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.
[]
> 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
[]
> @@ -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.

  parent reply	other threads:[~2013-06-27  0:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 16:13 [PATCH v1 0/3] pch_gbe: few clean ups to the driver Andy Shevchenko
2013-06-26 16:13 ` [PATCH v1 1/3] pch_gbe: remove inline keyword for exported functions Andy Shevchenko
2013-06-26 16:13 ` [PATCH v1 2/3] pch_gbe: convert pr_* to netdev_* Andy Shevchenko
2013-06-26 20:41   ` David Miller
2013-06-27  7:55     ` Andy Shevchenko
2013-06-27  0:59   ` Joe Perches [this message]
2013-06-26 16:13 ` [PATCH v1 3/3] pch_gbe: use managed functions pcim_* and devm_* Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372294770.2172.22.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dvhart@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).