[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6baa0dd0-407e-4ca6-8dda-9d778aac84b7@intel.com>
Date: Fri, 5 Sep 2025 13:38:47 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: <liuqiangneo@....com>, <anthony.l.nguyen@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Qiang Liu <liuqiang@...inos.cn>, "Dheeraj
Reddy Jonnalagadda" <dheeraj.linuxdev@...il.com>, Michal Swiatkowski
<michal.swiatkowski@...ux.intel.com>, Piotr Kwapulinski
<piotr.kwapulinski@...el.com>
Subject: Re: [PATCH] ixgbe: Remove self-assignment code
On 9/5/25 04:55, liuqiangneo@....com wrote:
> From: Qiang Liu <liuqiang@...inos.cn>
>
> After obtaining the register value via raw_desc,
> redundant self-assignment operations can be removed.
>
> Signed-off-by: Qiang Liu <liuqiang@...inos.cn>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> index bfeef5b0b99d..6efedf04a963 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> @@ -143,18 +143,14 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
>
> /* Read sync Admin Command response */
> if ((hicr & IXGBE_PF_HICR_SV)) {
> - for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> + for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
> - raw_desc[i] = raw_desc[i];
this, obviously pointless in current form, code is a remnant stripping
down our OOT driver, during which we have lost cpu_to_le32() call
there were already an attempt to fix that:
https://patchew.org/linux/20250115034117.172999-1-dheeraj.linuxdev@gmail.com/
but it got stuck on on some sparse warnings, and discussion weather to
go with full conversion (of whole driver, not only the two obviously
missing points) or not, and there were no final action taken
> - }
> }
>
> /* Read async Admin Command response */
> if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C)) {
> - for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> + for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
> - raw_desc[i] = raw_desc[i];
> - }
> }
>
> /* Handle timeout and invalid state of HICR register */
Powered by blists - more mailing lists