mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-04-06 This series contains a couple of fixes for the new ice driver. Wei Yongjun fixes the return error code for error case during init. Anirudh fixes the incorrect use of ARRAY_SIZE() in the ice ethtool code and fixed "for" loop calculations. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
eb1924809a
@ -468,8 +468,10 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
|
||||
mac_buf_len = sizeof(struct ice_aqc_manage_mac_read_resp);
|
||||
mac_buf = devm_kzalloc(ice_hw_to_dev(hw), mac_buf_len, GFP_KERNEL);
|
||||
|
||||
if (!mac_buf)
|
||||
if (!mac_buf) {
|
||||
status = ICE_ERR_NO_MEMORY;
|
||||
goto err_unroll_fltr_mgmt_struct;
|
||||
}
|
||||
|
||||
status = ice_aq_manage_mac_read(hw, mac_buf, mac_buf_len, NULL);
|
||||
devm_kfree(ice_hw_to_dev(hw), mac_buf);
|
||||
|
@ -156,7 +156,7 @@ ice_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
|
||||
|
||||
static int ice_get_regs_len(struct net_device __always_unused *netdev)
|
||||
{
|
||||
return ARRAY_SIZE(ice_regs_dump_list);
|
||||
return sizeof(ice_regs_dump_list);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -170,7 +170,7 @@ ice_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *p)
|
||||
|
||||
regs->version = 1;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ice_regs_dump_list) / sizeof(u32); ++i)
|
||||
for (i = 0; i < ARRAY_SIZE(ice_regs_dump_list); ++i)
|
||||
regs_buf[i] = rd32(hw, ice_regs_dump_list[i]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user