Skip to content

Commit 3dbb7fd

Browse files
JoePerchesJeff Kirsher
authored andcommitted
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: Joe Perches <joe@perches.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent b58f2f7 commit 3dbb7fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/ethernet/intel/i40e/i40e_ethtool.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int i40e_get_eeprom(struct net_device *netdev,
396396
ret_val = i40e_aq_read_nvm(hw, 0x0,
397397
eeprom->offset + (I40E_NVM_SECTOR_SIZE * i),
398398
len,
399-
(u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
399+
eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
400400
last, NULL);
401401
if (ret_val) {
402402
dev_info(&pf->pdev->dev,
@@ -408,7 +408,7 @@ static int i40e_get_eeprom(struct net_device *netdev,
408408

409409
release_nvm:
410410
i40e_release_nvm(hw);
411-
memcpy(bytes, (u8 *)eeprom_buff, eeprom->len);
411+
memcpy(bytes, eeprom_buff, eeprom->len);
412412
free_buff:
413413
kfree(eeprom_buff);
414414
return ret_val;

0 commit comments

Comments
 (0)