mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
[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:
parent
b2ab99c9a3
commit
fc47ff6b1b
3 changed files with 8 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue