Commit 3dbb7fd2 authored by Joe Perches's avatar Joe Perches Committed by Jeff Kirsher

i40e: Remove casts of pointer to same type

Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Done via coccinelle script:

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

-	(T *)foo
+	foo
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent b58f2f72
...@@ -396,7 +396,7 @@ static int i40e_get_eeprom(struct net_device *netdev, ...@@ -396,7 +396,7 @@ static int i40e_get_eeprom(struct net_device *netdev,
ret_val = i40e_aq_read_nvm(hw, 0x0, ret_val = i40e_aq_read_nvm(hw, 0x0,
eeprom->offset + (I40E_NVM_SECTOR_SIZE * i), eeprom->offset + (I40E_NVM_SECTOR_SIZE * i),
len, len,
(u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i), eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
last, NULL); last, NULL);
if (ret_val) { if (ret_val) {
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
...@@ -408,7 +408,7 @@ static int i40e_get_eeprom(struct net_device *netdev, ...@@ -408,7 +408,7 @@ static int i40e_get_eeprom(struct net_device *netdev,
release_nvm: release_nvm:
i40e_release_nvm(hw); i40e_release_nvm(hw);
memcpy(bytes, (u8 *)eeprom_buff, eeprom->len); memcpy(bytes, eeprom_buff, eeprom->len);
free_buff: free_buff:
kfree(eeprom_buff); kfree(eeprom_buff);
return ret_val; return ret_val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment