[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240119160219.GE89683@kernel.org>
Date: Fri, 19 Jan 2024 16:02:19 +0000
From: Simon Horman <horms@...nel.org>
To: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com,
netdev@...r.kernel.org
Subject: Re: [PATCH iwl-next v3 3/3] ixgbe: Cleanup after type convertion
On Thu, Jan 18, 2024 at 02:43:32PM +0100, Jedrzej Jagielski wrote:
> Clean up code where touched during type convertion by the patch
> 8035560dbfaf. Rearrange to fix reverse Christmas tree.
>
> Suggested-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
...
> @@ -771,12 +771,12 @@ static int ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
> ixgbe_link_speed speed,
> bool autoneg_wait_to_complete)
> {
> - bool autoneg = false;
> - int status;
> - u32 pma_pmd_1g, link_mode, links_reg, i;
> - u32 autoc2 = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
> u32 pma_pmd_10g_serial = autoc2 & IXGBE_AUTOC2_10G_SERIAL_PMA_PMD_MASK;
> ixgbe_link_speed link_capabilities = IXGBE_LINK_SPEED_UNKNOWN;
> + u32 autoc2 = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
> + u32 pma_pmd_1g, link_mode, links_reg, i;
> + bool autoneg = false;
> + int status;
Hi Jedrzej,
In the new arrangement above autoc2 is used before it is declared.
Perhaps this could be:
ixgbe_link_speed link_capabilities = IXGBE_LINK_SPEED_UNKNOWN;
u32 autoc2 = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
u32 pma_pmd_1g, link_mode, links_reg, i;
u32 pma_pmd_10g_serial;
bool autoneg = false;
int status;
...
pma_pmd_10g_serial = autoc2 & IXGBE_AUTOC2_10G_SERIAL_PMA_PMD_MASK;
>
> /* holds the value of AUTOC register at this current point in time */
> u32 current_autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC);
...
Powered by blists - more mailing lists