netdev.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: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 22:36 [PATCH net-next 00/11][pull request] Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e) Tony Nguyen
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]
2025-11-25 22:36 ` [PATCH net-next 02/11] ice: unify PHY FW loading status handler for E800 devices Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 03/11] ixgbe: Add 10G-BX support Tony Nguyen
2025-11-26 23:32   ` Jakub Kicinski
2025-11-27  6:33     ` Birger Koblitz
2025-11-27 16:07       ` Jakub Kicinski
2025-11-27 18:48         ` Birger Koblitz
2025-12-01 22:40           ` Tony Nguyen
2025-12-02  5:58             ` Birger Koblitz
2025-11-25 22:36 ` [PATCH net-next 04/11] ixgbevf: ixgbevf_q_vector clean up Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 05/11] idpf: convert vport state to bitmap Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 06/11] e1000e: Remove unneeded checks Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 07/11] ixgbe: avoid redundant call to ixgbe_non_sfp_link_config() Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 08/11] idpf: use desc_ring when checking completion queue DMA allocation Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 09/11] idpf: correct queue index in Rx allocation error messages Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 10/11] ice: fix comment typo and correct module format string Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 11/11] iavf: clarify VLAN add/delete log messages and lower log level Tony Nguyen
2025-11-28  2:38 ` [PATCH net-next 00/11][pull request] Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e) Jakub Kicinski
2025-12-01 17:03   ` Tony Nguyen
2025-11-28  2:40 ` patchwork-bot+netdevbpf

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).