diff options
| author | Joe Perches <joe@perches.com> | 2014-03-25 00:30:38 -0400 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-03-31 18:48:02 -0400 |
| commit | 3dbb7fd24794e39e503bc7844dae03c17d821326 (patch) | |
| tree | 3d090ee642a1dcb542435932e125573a7debd83c | |
| parent | b58f2f72797cf45f0e6867f671ff42128b84834b (diff) | |
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>
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index aa123f43fb8e..03d99cbc5c25 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |||
| @@ -396,7 +396,7 @@ static int i40e_get_eeprom(struct net_device *netdev, | |||
| 396 | ret_val = i40e_aq_read_nvm(hw, 0x0, | 396 | ret_val = i40e_aq_read_nvm(hw, 0x0, |
| 397 | eeprom->offset + (I40E_NVM_SECTOR_SIZE * i), | 397 | eeprom->offset + (I40E_NVM_SECTOR_SIZE * i), |
| 398 | len, | 398 | len, |
| 399 | (u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i), | 399 | eeprom_buff + (I40E_NVM_SECTOR_SIZE * i), |
| 400 | last, NULL); | 400 | last, NULL); |
| 401 | if (ret_val) { | 401 | if (ret_val) { |
| 402 | dev_info(&pf->pdev->dev, | 402 | dev_info(&pf->pdev->dev, |
| @@ -408,7 +408,7 @@ static int i40e_get_eeprom(struct net_device *netdev, | |||
| 408 | 408 | ||
| 409 | release_nvm: | 409 | release_nvm: |
| 410 | i40e_release_nvm(hw); | 410 | i40e_release_nvm(hw); |
| 411 | memcpy(bytes, (u8 *)eeprom_buff, eeprom->len); | 411 | memcpy(bytes, eeprom_buff, eeprom->len); |
| 412 | free_buff: | 412 | free_buff: |
| 413 | kfree(eeprom_buff); | 413 | kfree(eeprom_buff); |
| 414 | return ret_val; | 414 | return ret_val; |
