[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1361079536.2001.5.camel@joe-AO722>
Date: Sat, 16 Feb 2013 21:38:56 -0800
From: Joe Perches <joe@...ches.com>
To: Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
sony.chacko@...gic.com, Dept_NX_Linux_NIC_Driver@...gic.com
Subject: Re: [PATCH net-next 1/6] qlcnic: fix unsupported CDRP command error
message.
On Sat, 2013-02-16 at 23:53 -0500, Jitendra Kalsaria wrote:
> From: Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
>
> Add debug messages for FW CDRP command failure.
These aren't debug messages but are more detailed.
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
[]
> @@ -147,8 +147,36 @@ int qlcnic_82xx_issue_cmd(struct qlcnic_adapter *adapter,
> cmd->rsp.arg[0] = QLCNIC_RCODE_TIMEOUT;
> } else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
> cmd->rsp.arg[0] = QLCRD32(adapter, QLCNIC_CDRP_ARG(1));
> - dev_err(&pdev->dev, "failed card response code:0x%x\n",
> - cmd->rsp.arg[0]);
> + switch (cmd->rsp.arg[0]) {
> + case QLCNIC_RCODE_INVALID_ARGS:
> + dev_err(&pdev->dev, "CDRP invalid args 0x%x\n",
> + cmd->rsp.arg[0]);
> + break;
Not sure you care about object size much, but
it's much smaller object code to do:
const char *fmt;
switch (cmd->rsp.arg[0]);
case FOO:
fmt = "...";
break;
etc...
}
dev_err(&pdev->dev, fmt, cmd->rsp.arg[0]);
Also, the #defines are decimal, I don't know why you
print them out as hex or if you need to print them
at all really.
--
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