aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2009-02-27 13:55:55 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-10 10:05:35 -0400
commitfc47ff6b1b27fb736f255ed8cd490356e0cd228f (patch)
tree6be2387ebfcff7a1a729061b35f1ea6fdd115a46 /drivers/scsi/fcoe
parentb2ab99c9a300e572105d6db7f6efe0a4d1572167 (diff)
[SCSI] libfc, fcoe: Remove unnecessary cast by removing inline wrapper
Comment from "Andrew Morton <akpm@linux-foundation.org>" > +{ > + return (struct fcoe_softc *)lport_priv(lp); unneeded/undesirable cast of void*. There are probably zillions of instances of this - there always are. This whole inline function was unnecessary. The FCoE layer knows that it's data structure is stored in the lport private data, it can just access it from lport_priv(). Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe_sw.c2
-rw-r--r--drivers/scsi/fcoe/libfcoe.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sw.c b/drivers/scsi/fcoe/fcoe_sw.c
index 007d1fbae80..f667dce1bbb 100644
--- a/drivers/scsi/fcoe/fcoe_sw.c
+++ b/drivers/scsi/fcoe/fcoe_sw.c
@@ -297,7 +297,7 @@ static int fcoe_sw_destroy(struct net_device *netdev)
297 if (!lp) 297 if (!lp)
298 return -ENODEV; 298 return -ENODEV;
299 299
300 fc = fcoe_softc(lp); 300 fc = lport_priv(lp);
301 301
302 /* Logout of the fabric */ 302 /* Logout of the fabric */
303 fc_fabric_logoff(lp); 303 fc_fabric_logoff(lp);
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index d006d657681..02f044a8715 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -387,7 +387,7 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp)
387 387
388 WARN_ON((fr_len(fp) % sizeof(u32)) != 0); 388 WARN_ON((fr_len(fp) % sizeof(u32)) != 0);
389 389
390 fc = fcoe_softc(lp); 390 fc = lport_priv(lp);
391 /* 391 /*
392 * if it is a flogi then we need to learn gw-addr 392 * if it is a flogi then we need to learn gw-addr
393 * and my own fcid 393 * and my own fcid
@@ -768,7 +768,7 @@ static int fcoe_check_wait_queue(struct fc_lport *lp)
768 struct sk_buff *skb; 768 struct sk_buff *skb;
769 struct fcoe_softc *fc; 769 struct fcoe_softc *fc;
770 770
771 fc = fcoe_softc(lp); 771 fc = lport_priv(lp);
772 spin_lock_bh(&fc->fcoe_pending_queue.lock); 772 spin_lock_bh(&fc->fcoe_pending_queue.lock);
773 773
774 /* 774 /*
@@ -805,7 +805,7 @@ static void fcoe_insert_wait_queue_head(struct fc_lport *lp,
805{ 805{
806 struct fcoe_softc *fc; 806 struct fcoe_softc *fc;
807 807
808 fc = fcoe_softc(lp); 808 fc = lport_priv(lp);
809 spin_lock_bh(&fc->fcoe_pending_queue.lock); 809 spin_lock_bh(&fc->fcoe_pending_queue.lock);
810 __skb_queue_head(&fc->fcoe_pending_queue, skb); 810 __skb_queue_head(&fc->fcoe_pending_queue, skb);
811 spin_unlock_bh(&fc->fcoe_pending_queue.lock); 811 spin_unlock_bh(&fc->fcoe_pending_queue.lock);
@@ -823,7 +823,7 @@ static void fcoe_insert_wait_queue(struct fc_lport *lp,
823{ 823{
824 struct fcoe_softc *fc; 824 struct fcoe_softc *fc;
825 825
826 fc = fcoe_softc(lp); 826 fc = lport_priv(lp);
827 spin_lock_bh(&fc->fcoe_pending_queue.lock); 827 spin_lock_bh(&fc->fcoe_pending_queue.lock);
828 __skb_queue_tail(&fc->fcoe_pending_queue, skb); 828 __skb_queue_tail(&fc->fcoe_pending_queue, skb);
829 spin_unlock_bh(&fc->fcoe_pending_queue.lock); 829 spin_unlock_bh(&fc->fcoe_pending_queue.lock);
@@ -1113,7 +1113,7 @@ MODULE_PARM_DESC(destroy, "Destroy fcoe port");
1113 */ 1113 */
1114int fcoe_link_ok(struct fc_lport *lp) 1114int fcoe_link_ok(struct fc_lport *lp)
1115{ 1115{
1116 struct fcoe_softc *fc = fcoe_softc(lp); 1116 struct fcoe_softc *fc = lport_priv(lp);
1117 struct net_device *dev = fc->real_dev; 1117 struct net_device *dev = fc->real_dev;
1118 struct ethtool_cmd ecmd = { ETHTOOL_GSET }; 1118 struct ethtool_cmd ecmd = { ETHTOOL_GSET };
1119 int rc = 0; 1119 int rc = 0;
@@ -1329,7 +1329,7 @@ int fcoe_hostlist_add(const struct fc_lport *lp)
1329 1329
1330 fc = fcoe_hostlist_lookup_softc(fcoe_netdev(lp)); 1330 fc = fcoe_hostlist_lookup_softc(fcoe_netdev(lp));
1331 if (!fc) { 1331 if (!fc) {
1332 fc = fcoe_softc(lp); 1332 fc = lport_priv(lp);
1333 write_lock_bh(&fcoe_hostlist_lock); 1333 write_lock_bh(&fcoe_hostlist_lock);
1334 list_add_tail(&fc->list, &fcoe_hostlist); 1334 list_add_tail(&fc->list, &fcoe_hostlist);
1335 write_unlock_bh(&fcoe_hostlist_lock); 1335 write_unlock_bh(&fcoe_hostlist_lock);