[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1348846783.14262.10.camel@joe-AO722>
Date: Fri, 28 Sep 2012 08:39:43 -0700
From: Joe Perches <joe@...ches.com>
To: Sathya Perla <sathya.perla@...lex.com>
Cc: netdev@...r.kernel.org
Subject: Re: [net-next PATCH 4/4] be2net: fixup log messages
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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists