linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	richardcochran@gmail.com, corbet@lwn.net,
	linux-doc@vger.kernel.org, horms@kernel.org,
	aleksandr.loktionov@intel.com, przemyslaw.kitszel@intel.com,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Grzegorz Nitka <grzegorz.nitka@intel.com>
Subject: Re: [PATCH net-next 01/11] ice: add support for unmanaged DPLL on E830 NIC
Date: Wed, 26 Nov 2025 15:30:57 -0800	[thread overview]
Message-ID: <20251126153057.2bbc21d0@kernel.org> (raw)
In-Reply-To: <20251125223632.1857532-2-anthony.l.nguyen@intel.com>

On Tue, 25 Nov 2025 14:36:20 -0800 Tony Nguyen wrote:
> +int ice_is_health_status_code_supported(struct ice_hw *hw, u16 code,
> +					bool *supported)
> +{
> +	const int BUFF_SIZE = ICE_AQC_HEALTH_STATUS_CODE_NUM;
> +	struct ice_aqc_health_status_supp_elem *buff;
> +	int ret;
> +
> +	buff = kcalloc(BUFF_SIZE, sizeof(*buff), GFP_KERNEL);
> +	if (!buff)
> +		return -ENOMEM;
> +	ret = ice_aq_get_health_status_supported(hw, buff, BUFF_SIZE);
> +	if (ret)
> +		goto free_buff;
> +	for (int i = 0; i < BUFF_SIZE && buff[i].health_status_code; i++)
> +		if (le16_to_cpu(buff[i].health_status_code) == code) {
> +			*supported = true;
> +			break;
> +		}

Claude Code review says you may not find the @code ...

> +free_buff:
> +	kfree(buff);
> +	return ret;

.. but still report 0 ..

> +	/* Initialize unmanaged DPLL detection */
> +	{
> +		u16 code = ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK;
> +		int err;
> +
> +		err = ice_is_health_status_code_supported(&pf->hw, code,
> +							  &pf->dplls.unmanaged);
> +		if (err || !ice_is_unmanaged_cgu_in_netlist(&pf->hw))
> +			pf->dplls.unmanaged = false;

.. which is not handled here

> +	}

BTW floating code block like:

	{
		int i;

		bla(i);
	}

Is not an acceptable coding style upstream.

      reply	other threads:[~2025-11-26 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251125223632.1857532-1-anthony.l.nguyen@intel.com>
2025-11-25 22:36 ` [PATCH net-next 01/11] ice: add support for unmanaged DPLL on E830 NIC Tony Nguyen
2025-11-26 23:30   ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251126153057.2bbc21d0@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=grzegorz.nitka@intel.com \
    --cc=horms@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).