All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] ice: add support for unmanaged dpll on E830 NIC
Date: Thu, 28 Aug 2025 11:33:02 +0100	[thread overview]
Message-ID: <20250828103302.GZ10519@horms.kernel.org> (raw)
In-Reply-To: <20250826153118.2129807-1-arkadiusz.kubalewski@intel.com>

On Tue, Aug 26, 2025 at 05:31:18PM +0200, Arkadiusz Kubalewski wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c

...

> +/**
> + * ice_dpll_init_info_unmanaged - init dpll information for unmanaged dpll
> + * @pf: board private structure
> + *
> + * Acquire (from HW) and set basic dpll information (on pf->dplls struct).
> + * For unmanaged dpll mode.
> + *
> + * Return:
> + * * 0 - success
> + * * negative - init failure reason
> + */
> +static int ice_dpll_init_info_unmanaged(struct ice_pf *pf)
> +{
> +	struct ice_dplls *d = &pf->dplls;
> +	struct ice_dpll *de = &d->eec;
> +	int ret = 0;
> +
> +	d->clock_id = ice_generate_clock_id(pf);
> +	d->num_inputs = ice_cgu_get_pin_num(&pf->hw, true);
> +	d->num_outputs = ice_cgu_get_pin_num(&pf->hw, false);
> +	ice_dpll_lock_state_init_unmanaged(pf);
> +
> +	d->inputs = kcalloc(d->num_inputs, sizeof(*d->inputs), GFP_KERNEL);
> +	if (!d->inputs)
> +		return -ENOMEM;
> +
> +	ret = ice_dpll_init_pins_info(pf, ICE_DPLL_PIN_TYPE_INPUT);
> +	if (ret)
> +		goto deinit_info;
> +
> +	d->outputs = kcalloc(d->num_outputs, sizeof(*d->outputs), GFP_KERNEL);
> +	if (!d->outputs)

Hi Arkadiusz,

I think the following is needed here:

		err = -ENOMEM;

Flagged by Smatch.

> +		goto deinit_info;
> +
> +	ret = ice_dpll_init_pins_info(pf, ICE_DPLL_PIN_TYPE_OUTPUT);
> +	if (ret)
> +		goto deinit_info;
> +
> +	de->mode = DPLL_MODE_AUTOMATIC;
> +	dev_dbg(ice_pf_to_dev(pf), "%s - success, inputs:%u, outputs:%u\n",
> +		__func__, d->num_inputs, d->num_outputs);
> +	return 0;
> +deinit_info:
> +	dev_err(ice_pf_to_dev(pf), "%s - fail: d->inputs:%p, d->outputs:%p\n",
> +		__func__, d->inputs, d->outputs);
> +	ice_dpll_deinit_info(pf);
> +	return ret;
> +}

...

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [PATCH iwl-next v1] ice: add support for unmanaged dpll on E830 NIC
Date: Thu, 28 Aug 2025 11:33:02 +0100	[thread overview]
Message-ID: <20250828103302.GZ10519@horms.kernel.org> (raw)
In-Reply-To: <20250826153118.2129807-1-arkadiusz.kubalewski@intel.com>

On Tue, Aug 26, 2025 at 05:31:18PM +0200, Arkadiusz Kubalewski wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c

...

> +/**
> + * ice_dpll_init_info_unmanaged - init dpll information for unmanaged dpll
> + * @pf: board private structure
> + *
> + * Acquire (from HW) and set basic dpll information (on pf->dplls struct).
> + * For unmanaged dpll mode.
> + *
> + * Return:
> + * * 0 - success
> + * * negative - init failure reason
> + */
> +static int ice_dpll_init_info_unmanaged(struct ice_pf *pf)
> +{
> +	struct ice_dplls *d = &pf->dplls;
> +	struct ice_dpll *de = &d->eec;
> +	int ret = 0;
> +
> +	d->clock_id = ice_generate_clock_id(pf);
> +	d->num_inputs = ice_cgu_get_pin_num(&pf->hw, true);
> +	d->num_outputs = ice_cgu_get_pin_num(&pf->hw, false);
> +	ice_dpll_lock_state_init_unmanaged(pf);
> +
> +	d->inputs = kcalloc(d->num_inputs, sizeof(*d->inputs), GFP_KERNEL);
> +	if (!d->inputs)
> +		return -ENOMEM;
> +
> +	ret = ice_dpll_init_pins_info(pf, ICE_DPLL_PIN_TYPE_INPUT);
> +	if (ret)
> +		goto deinit_info;
> +
> +	d->outputs = kcalloc(d->num_outputs, sizeof(*d->outputs), GFP_KERNEL);
> +	if (!d->outputs)

Hi Arkadiusz,

I think the following is needed here:

		err = -ENOMEM;

Flagged by Smatch.

> +		goto deinit_info;
> +
> +	ret = ice_dpll_init_pins_info(pf, ICE_DPLL_PIN_TYPE_OUTPUT);
> +	if (ret)
> +		goto deinit_info;
> +
> +	de->mode = DPLL_MODE_AUTOMATIC;
> +	dev_dbg(ice_pf_to_dev(pf), "%s - success, inputs:%u, outputs:%u\n",
> +		__func__, d->num_inputs, d->num_outputs);
> +	return 0;
> +deinit_info:
> +	dev_err(ice_pf_to_dev(pf), "%s - fail: d->inputs:%p, d->outputs:%p\n",
> +		__func__, d->inputs, d->outputs);
> +	ice_dpll_deinit_info(pf);
> +	return ret;
> +}

...

  parent reply	other threads:[~2025-08-28 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 15:31 [Intel-wired-lan] [PATCH iwl-next v1] ice: add support for unmanaged dpll on E830 NIC Arkadiusz Kubalewski
2025-08-26 15:31 ` Arkadiusz Kubalewski
2025-08-26 20:32 ` [Intel-wired-lan] " Przemek Kitszel
2025-08-26 20:32   ` Przemek Kitszel
2025-08-29  8:30   ` [Intel-wired-lan] " Kubalewski, Arkadiusz
2025-08-29  8:30     ` Kubalewski, Arkadiusz
2025-08-28 10:33 ` Simon Horman [this message]
2025-08-28 10:33   ` Simon Horman
2025-08-29  7:58   ` [Intel-wired-lan] " Kubalewski, Arkadiusz
2025-08-29  7:58     ` Kubalewski, Arkadiusz

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=20250828103302.GZ10519@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.