[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>
This commit is contained in:

committed by
James Bottomley

parent
b2ab99c9a3
commit
fc47ff6b1b
@@ -58,16 +58,10 @@ struct fcoe_softc {
|
||||
u8 address_mode;
|
||||
};
|
||||
|
||||
static inline struct fcoe_softc *fcoe_softc(
|
||||
const struct fc_lport *lp)
|
||||
{
|
||||
return (struct fcoe_softc *)lport_priv(lp);
|
||||
}
|
||||
|
||||
static inline struct net_device *fcoe_netdev(
|
||||
const struct fc_lport *lp)
|
||||
{
|
||||
return fcoe_softc(lp)->real_dev;
|
||||
return ((struct fcoe_softc *)lport_priv(lp))->real_dev;
|
||||
}
|
||||
|
||||
static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb)
|
||||
|
Reference in New Issue
Block a user