Skip to content

Commit d3616dc

Browse files
wuychdavem330
authored andcommitted
net: liquidio: lio_main: Remove unnecessary (void*) conversions
Pointer variables of void * type do not require type cast. Signed-off-by: wuych <yunchuan@nfschina.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2598619 commit d3616dc

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ static void octeon_droq_bh(struct tasklet_struct *t)
191191

192192
static int lio_wait_for_oq_pkts(struct octeon_device *oct)
193193
{
194-
struct octeon_device_priv *oct_priv =
195-
(struct octeon_device_priv *)oct->priv;
194+
struct octeon_device_priv *oct_priv = oct->priv;
196195
int retry = 100, pkt_cnt = 0, pending_pkts = 0;
197196
int i;
198197

@@ -950,8 +949,7 @@ static void octeon_destroy_resources(struct octeon_device *oct)
950949
{
951950
int i, refcount;
952951
struct msix_entry *msix_entries;
953-
struct octeon_device_priv *oct_priv =
954-
(struct octeon_device_priv *)oct->priv;
952+
struct octeon_device_priv *oct_priv = oct->priv;
955953

956954
struct handshake *hs;
957955

@@ -1211,8 +1209,7 @@ static int send_rx_ctrl_cmd(struct lio *lio, int start_stop)
12111209
static void liquidio_destroy_nic_device(struct octeon_device *oct, int ifidx)
12121210
{
12131211
struct net_device *netdev = oct->props[ifidx].netdev;
1214-
struct octeon_device_priv *oct_priv =
1215-
(struct octeon_device_priv *)oct->priv;
1212+
struct octeon_device_priv *oct_priv = oct->priv;
12161213
struct napi_struct *napi, *n;
12171214
struct lio *lio;
12181215

@@ -1774,8 +1771,7 @@ static int liquidio_open(struct net_device *netdev)
17741771
{
17751772
struct lio *lio = GET_LIO(netdev);
17761773
struct octeon_device *oct = lio->oct_dev;
1777-
struct octeon_device_priv *oct_priv =
1778-
(struct octeon_device_priv *)oct->priv;
1774+
struct octeon_device_priv *oct_priv = oct->priv;
17791775
struct napi_struct *napi, *n;
17801776
int ret = 0;
17811777

@@ -1855,8 +1851,7 @@ static int liquidio_stop(struct net_device *netdev)
18551851
{
18561852
struct lio *lio = GET_LIO(netdev);
18571853
struct octeon_device *oct = lio->oct_dev;
1858-
struct octeon_device_priv *oct_priv =
1859-
(struct octeon_device_priv *)oct->priv;
1854+
struct octeon_device_priv *oct_priv = oct->priv;
18601855
struct napi_struct *napi, *n;
18611856
int ret = 0;
18621857

@@ -4057,8 +4052,7 @@ static int octeon_device_init(struct octeon_device *octeon_dev)
40574052
char bootcmd[] = "\n";
40584053
char *dbg_enb = NULL;
40594054
enum lio_fw_state fw_state;
4060-
struct octeon_device_priv *oct_priv =
4061-
(struct octeon_device_priv *)octeon_dev->priv;
4055+
struct octeon_device_priv *oct_priv = octeon_dev->priv;
40624056
atomic_set(&octeon_dev->status, OCT_DEV_BEGIN_STATE);
40634057

40644058
/* Enable access to the octeon device and make its DMA capability

0 commit comments

Comments
 (0)