From: Joe Perches <joe@perches.com>
To: Sathya Perla <sathya.perla@emulex.com>
Cc: netdev@vger.kernel.org
Subject: Re: [net-next PATCH 4/4] be2net: fixup log messages
Date: Fri, 28 Sep 2012 08:39:43 -0700 [thread overview]
Message-ID: <1348846783.14262.10.camel@joe-AO722> (raw)
In-Reply-To: <e698cd68-540d-4a7a-bd76-2e9c73ddf19c@CMEXHTCAS2.ad.emulex.com>
On Fri, 2012-09-28 at 20:09 +0530, Sathya Perla wrote:
> Added and modified a few log messages mostly in probe path.
Trivial comment:
> diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
[]
> @@ -3797,6 +3802,23 @@ static bool be_reset_required(struct be_adapter *adapter)
> return be_find_vfs(adapter, ENABLED) > 0 ? false : true;
> }
>
> +static char *mc_name(struct be_adapter *adapter)
> +{
> + if (adapter->function_mode & FLEX10_MODE)
> + return "FLEX10";
> + else if (adapter->function_mode & VNIC_MODE)
> + return "vNIC";
> + else if (adapter->function_mode & UMC_ENABLED)
> + return "UMC";
> + else
> + return "";
> +}
Maybe something other than "" to identify this state
or add a space before or after the actual uses so that
the unprefixed state prints without 2 spaces.
Perhaps if you don't want to identify the non-virtual (?)
state:
static char *mc_name(struct be_adapter *adapter)
{
if (adapter->function_mode & FLEX10_MODE)
return " FLEX10";
else if (adapter->function_mode & VNIC_MODE)
return " vNIC";
else if (adapter->function_mode & UMC_ENABLED)
return " UMC";
else
return "";
}
[]
> @@ -3901,8 +3923,8 @@ static int __devinit be_probe(struct pci_dev *pdev,
>
> be_cmd_query_port_name(adapter, &port_name);
>
> - dev_info(&pdev->dev, "%s: %s port %c\n", netdev->name, nic_name(pdev),
> - port_name);
> + dev_info(&pdev->dev, "%s: %s %s port %c\n", nic_name(pdev),
> + func_name(adapter), mc_name(adapter), port_name);
>
> return 0;
and:
dev_info(&pdev->dev, "%s: %s%s port %c\n",
nic_name(pdev), func_name(adapter), mc_name(adapter),
port_name);
next prev parent reply other threads:[~2012-09-28 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1348843184-22214-1-git-send-email-sathya.perla@emulex.com>
2012-09-28 14:39 ` [net-next PATCH 1/4] be2net: remove type argument of be_cmd_mac_addr_query() Sathya Perla
2012-09-30 6:15 ` David Miller
2012-09-28 14:39 ` [net-next PATCH 2/4] be2net: fix wrong handling of be_setup() failure in be_probe() Sathya Perla
2012-09-30 6:15 ` David Miller
2012-09-28 14:39 ` [net-next PATCH 3/4] be2net: cleanup code related to be_link_status_query() Sathya Perla
2012-09-30 6:16 ` David Miller
2012-09-28 14:39 ` [net-next PATCH 4/4] be2net: fixup log messages Sathya Perla
2012-09-28 15:39 ` Joe Perches [this message]
2012-09-30 6:16 ` David Miller
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=1348846783.14262.10.camel@joe-AO722 \
--to=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=sathya.perla@emulex.com \
/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).