From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Jack Morgan <jack.morgan@intel.com>,
Fengguang Wu <fengguang.wu@intel.com>, Yi Zou <yi.zou@intel.com>
Subject: [PATCH 3/8] fcoe: fix the link error status block sparse warnings
Date: Tue, 09 Jul 2013 12:47:21 -0700 [thread overview]
Message-ID: <20130709194721.10724.81339.stgit@fritz> (raw)
In-Reply-To: <20130709194705.10724.64013.stgit@fritz>
From: Yi Zou <yi.zou@intel.com>
Both fcoe_fc_els_lesb and fc_els_lesb are in __be32 already, and both are
exactly the same size in bytes, with somewhat different member names to
reflect the fact the former is for Ethernet media the latter is for Fiber
Channel, so, remove conversion and use __be32 directly. This fixes the warning
from sparse check.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/fcoe/fcoe_transport.c | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index f3a5a53..bedd422 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -180,24 +180,10 @@ void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev)
{
struct fcoe_ctlr *fip = fcoe_ctlr_device_priv(ctlr_dev);
struct net_device *netdev = fcoe_get_netdev(fip->lp);
- struct fcoe_fc_els_lesb *fcoe_lesb;
- struct fc_els_lesb fc_lesb;
-
- __fcoe_get_lesb(fip->lp, &fc_lesb, netdev);
- fcoe_lesb = (struct fcoe_fc_els_lesb *)(&fc_lesb);
-
- ctlr_dev->lesb.lesb_link_fail =
- ntohl(fcoe_lesb->lesb_link_fail);
- ctlr_dev->lesb.lesb_vlink_fail =
- ntohl(fcoe_lesb->lesb_vlink_fail);
- ctlr_dev->lesb.lesb_miss_fka =
- ntohl(fcoe_lesb->lesb_miss_fka);
- ctlr_dev->lesb.lesb_symb_err =
- ntohl(fcoe_lesb->lesb_symb_err);
- ctlr_dev->lesb.lesb_err_block =
- ntohl(fcoe_lesb->lesb_err_block);
- ctlr_dev->lesb.lesb_fcs_error =
- ntohl(fcoe_lesb->lesb_fcs_error);
+ struct fc_els_lesb *fc_lesb;
+
+ fc_lesb = (struct fc_els_lesb *)(&ctlr_dev->lesb);
+ __fcoe_get_lesb(fip->lp, fc_lesb, netdev);
}
EXPORT_SYMBOL_GPL(fcoe_ctlr_get_lesb);
next prev parent reply other threads:[~2013-07-09 19:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 19:47 [PATCH 0/8] libfc, libfcoe, fcoe updates for 3.11(+) Robert Love
2013-07-09 19:47 ` [PATCH 1/8] libfc: Reject PLOGI from nodes with incompatible role Robert Love
2013-07-09 19:47 ` [PATCH 2/8] fcoe: Fix smatch warning in fcoe_fdmi_info function Robert Love
2013-07-09 19:47 ` Robert Love [this message]
2013-07-09 19:47 ` [PATCH 4/8] libfc: Remove extra space in fc_exch_timer_cancel definition Robert Love
2013-07-09 19:53 ` Neil Horman
2013-07-09 19:47 ` [PATCH 5/8] libfc: Differentiate echange timer cancellation debug statements Robert Love
2013-07-09 19:54 ` Neil Horman
2013-07-09 19:47 ` [PATCH 6/8] libfcoe: Fix meaningless log statement Robert Love
2013-07-09 19:54 ` Neil Horman
2013-07-09 19:47 ` [PATCH 7/8] fcoe: Stop fc_rport_priv structure leak Robert Love
2013-07-09 19:47 ` [PATCH 8/8] fcoe: Reduce number of sparse warnings Robert Love
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=20130709194721.10724.81339.stgit@fritz \
--to=robert.w.love@intel.com \
--cc=fengguang.wu@intel.com \
--cc=jack.morgan@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=yi.zou@intel.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).