Commit 3775b814 authored by Mark Rustad's avatar Mark Rustad Committed by Jeff Kirsher

ixgbe: Change the lan_id and func fields to a u8 to avoid casts

Since the lan_id and func fields only ever hold small values, make
them u8 to avoid casts used to silence warnings.
Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 832ac592
...@@ -3600,7 +3600,7 @@ s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min, ...@@ -3600,7 +3600,7 @@ s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min,
fw_cmd.hdr.cmd = FW_CEM_CMD_DRIVER_INFO; fw_cmd.hdr.cmd = FW_CEM_CMD_DRIVER_INFO;
fw_cmd.hdr.buf_len = FW_CEM_CMD_DRIVER_INFO_LEN; fw_cmd.hdr.buf_len = FW_CEM_CMD_DRIVER_INFO_LEN;
fw_cmd.hdr.cmd_or_resp.cmd_resv = FW_CEM_CMD_RESERVED; fw_cmd.hdr.cmd_or_resp.cmd_resv = FW_CEM_CMD_RESERVED;
fw_cmd.port_num = (u8)hw->bus.func; fw_cmd.port_num = hw->bus.func;
fw_cmd.ver_maj = maj; fw_cmd.ver_maj = maj;
fw_cmd.ver_min = min; fw_cmd.ver_min = min;
fw_cmd.ver_build = build; fw_cmd.ver_build = build;
......
...@@ -3122,8 +3122,8 @@ struct ixgbe_bus_info { ...@@ -3122,8 +3122,8 @@ struct ixgbe_bus_info {
enum ixgbe_bus_width width; enum ixgbe_bus_width width;
enum ixgbe_bus_type type; enum ixgbe_bus_type type;
u16 func; u8 func;
u16 lan_id; u8 lan_id;
}; };
/* Flow control parameters */ /* Flow control parameters */
......
...@@ -862,7 +862,7 @@ static void ixgbe_disable_rx_x550(struct ixgbe_hw *hw) ...@@ -862,7 +862,7 @@ static void ixgbe_disable_rx_x550(struct ixgbe_hw *hw)
fw_cmd.hdr.cmd = FW_DISABLE_RXEN_CMD; fw_cmd.hdr.cmd = FW_DISABLE_RXEN_CMD;
fw_cmd.hdr.buf_len = FW_DISABLE_RXEN_LEN; fw_cmd.hdr.buf_len = FW_DISABLE_RXEN_LEN;
fw_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; fw_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
fw_cmd.port_number = (u8)hw->bus.lan_id; fw_cmd.port_number = hw->bus.lan_id;
status = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd, status = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd,
sizeof(struct ixgbe_hic_disable_rxen), sizeof(struct ixgbe_hic_disable_rxen),
......
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