From: Ben Hutchings <bhutchings@solarflare.com>
To: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
ameen.rahman@qlogic.com, anirban.chakraborty@qlogic.com,
Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Subject: Re: [PATCHv2 NEXT 6/8] qlcnic: sparse warning fixes
Date: Tue, 12 Apr 2011 00:00:01 +0100 [thread overview]
Message-ID: <1302562801.5282.576.camel@localhost> (raw)
In-Reply-To: <1286205297-23214-6-git-send-email-amit.salecha@qlogic.com>
On Mon, 2010-10-04 at 08:14 -0700, Amit Kumar Salecha wrote:
> From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
>
> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
> ---
> drivers/net/qlcnic/qlcnic_ctx.c | 12 ++++++------
> drivers/net/qlcnic/qlcnic_main.c | 10 +++++-----
> 2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
> index a4c4d09..75e3b19 100644
> --- a/drivers/net/qlcnic/qlcnic_ctx.c
> +++ b/drivers/net/qlcnic/qlcnic_ctx.c
> @@ -742,15 +742,15 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter,
>
> if (err == QLCNIC_RCODE_SUCCESS) {
> for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++, npar++, pci_info++) {
> - pci_info->id = le32_to_cpu(npar->id);
> - pci_info->active = le32_to_cpu(npar->active);
> - pci_info->type = le32_to_cpu(npar->type);
> + pci_info->id = le16_to_cpu(npar->id);
> + pci_info->active = le16_to_cpu(npar->active);
> + pci_info->type = le16_to_cpu(npar->type);
> pci_info->default_port =
> - le32_to_cpu(npar->default_port);
> + le16_to_cpu(npar->default_port);
> pci_info->tx_min_bw =
> - le32_to_cpu(npar->tx_min_bw);
> + le16_to_cpu(npar->tx_min_bw);
> pci_info->tx_max_bw =
> - le32_to_cpu(npar->tx_max_bw);
> + le16_to_cpu(npar->tx_max_bw);
[...]
It looks like this function was broken on big-endian systems. The
commit message should say that you are fixing a bug, not just that some
unspecified 'sparse warning[s]' (that alerted you to the bug) were
fixed.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-04-11 23:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1286205297-23214-1-git-send-email-amit.salecha@qlogic.com>
2010-10-04 15:14 ` [PATCHv2 NEXT 2/8] qlcnic: fix eswitch stats Amit Kumar Salecha
2011-04-11 22:55 ` David Miller
2011-04-12 4:48 ` Amit Salecha
2011-04-11 23:09 ` Stephen Hemminger
2010-10-04 15:14 ` [PATCHv2 NEXT 3/8] qlcnic: fix diag register Amit Kumar Salecha
2010-10-04 15:14 ` [PATCHv2 NEXT 4/8] qlcnic: fix endianess for lro Amit Kumar Salecha
2010-10-04 15:14 ` [PATCHv2 NEXT 5/8] qlcnic: fix vlan TSO on big endian machine Amit Kumar Salecha
2010-10-04 15:14 ` [PATCHv2 NEXT 6/8] qlcnic: sparse warning fixes Amit Kumar Salecha
2011-04-11 23:00 ` Ben Hutchings [this message]
2010-10-04 15:14 ` [PATCHv2 NEXT 7/8] qlcnic: cleanup port mode setting Amit Kumar Salecha
2010-10-04 15:14 ` [PATCHv2 NEXT 8/8] qlcnic: set mtu lower limit Amit Kumar Salecha
2010-10-04 14:20 [PATCHv2 NEXT 0/8]qlcnic: miscellaneous fixes Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 6/8] qlcnic: sparse warning fixes Amit Kumar Salecha
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=1302562801.5282.576.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=ameen.rahman@qlogic.com \
--cc=amit.salecha@qlogic.com \
--cc=anirban.chakraborty@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sucheta.chakraborty@qlogic.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).