staging: octeon: remove typedef declaration for cvmx_helper_link_info
Remove declaration of union cvmx_helper_link_info as typedef. Also replace its previous uses with new union declaration. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/fb373aed8fd2b04d01198f5a5769fd2476714e88.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ef1fe6b736
commit
73aef0c9d2
@ -65,7 +65,7 @@ int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
}
|
||||
|
||||
void cvm_oct_note_carrier(struct octeon_ethernet *priv,
|
||||
cvmx_helper_link_info_t li)
|
||||
union cvmx_helper_link_info li)
|
||||
{
|
||||
if (li.s.link_up) {
|
||||
pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d, queue %d\n",
|
||||
@ -81,7 +81,7 @@ void cvm_oct_note_carrier(struct octeon_ethernet *priv,
|
||||
void cvm_oct_adjust_link(struct net_device *dev)
|
||||
{
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
|
||||
link_info.u64 = 0;
|
||||
link_info.s.link_up = dev->phydev->link ? 1 : 0;
|
||||
@ -106,7 +106,7 @@ int cvm_oct_common_stop(struct net_device *dev)
|
||||
{
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
int interface = INTERFACE(priv->port);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
union cvmx_gmxx_prtx_cfg gmx_cfg;
|
||||
int index = INDEX(priv->port);
|
||||
|
||||
|
@ -53,7 +53,7 @@ static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable)
|
||||
static void cvm_oct_check_preamble_errors(struct net_device *dev)
|
||||
{
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
unsigned long flags;
|
||||
|
||||
link_info.u64 = priv->link_info;
|
||||
@ -103,7 +103,7 @@ static void cvm_oct_check_preamble_errors(struct net_device *dev)
|
||||
static void cvm_oct_rgmii_poll(struct net_device *dev)
|
||||
{
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
bool status_change;
|
||||
|
||||
link_info = cvmx_helper_link_get(priv->port);
|
||||
|
@ -460,7 +460,7 @@ int cvm_oct_common_open(struct net_device *dev,
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
int interface = INTERFACE(priv->port);
|
||||
int index = INDEX(priv->port);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
int rv;
|
||||
|
||||
rv = cvm_oct_phy_setup_device(dev);
|
||||
@ -496,7 +496,7 @@ int cvm_oct_common_open(struct net_device *dev,
|
||||
void cvm_oct_link_poll(struct net_device *dev)
|
||||
{
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
cvmx_helper_link_info_t link_info;
|
||||
union cvmx_helper_link_info link_info;
|
||||
|
||||
link_info = cvmx_helper_link_get(priv->port);
|
||||
if (link_info.u64 == priv->link_info)
|
||||
|
@ -91,7 +91,7 @@ int cvm_oct_common_stop(struct net_device *dev);
|
||||
int cvm_oct_common_open(struct net_device *dev,
|
||||
void (*link_poll)(struct net_device *));
|
||||
void cvm_oct_note_carrier(struct octeon_ethernet *priv,
|
||||
cvmx_helper_link_info_t li);
|
||||
union cvmx_helper_link_info li);
|
||||
void cvm_oct_link_poll(struct net_device *dev);
|
||||
|
||||
extern int always_use_pow;
|
||||
|
@ -191,7 +191,7 @@ struct cvmx_wqe {
|
||||
uint8_t packet_data[96];
|
||||
};
|
||||
|
||||
typedef union {
|
||||
union cvmx_helper_link_info {
|
||||
uint64_t u64;
|
||||
struct {
|
||||
uint64_t reserved_20_63:44;
|
||||
@ -199,7 +199,7 @@ typedef union {
|
||||
uint64_t full_duplex:1; /**< 1 if the link is full duplex */
|
||||
uint64_t speed:18; /**< Speed of the link in Mbps */
|
||||
} s;
|
||||
} cvmx_helper_link_info_t;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
CVMX_FAU_REG_32_START = 0,
|
||||
@ -1267,15 +1267,15 @@ static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
|
||||
static inline union cvmx_helper_link_info cvmx_helper_link_get(int ipd_port)
|
||||
{
|
||||
cvmx_helper_link_info_t ret = { .u64 = 0 };
|
||||
union cvmx_helper_link_info ret = { .u64 = 0 };
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int cvmx_helper_link_set(int ipd_port,
|
||||
cvmx_helper_link_info_t link_info)
|
||||
union cvmx_helper_link_info link_info)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user