Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 2/2] ixgbe: Refactor returning internal error codes
Date: Thu, 7 Dec 2023 15:19:47 -0800	[thread overview]
Message-ID: <14130a24-ec38-cdab-6dfc-8073c9335166@intel.com> (raw)
In-Reply-To: <20231205112840.149813-3-jedrzej.jagielski@intel.com>



On 12/5/2023 3:28 AM, Jedrzej Jagielski wrote:
> Change returning codes to the kernel ones instead of
> the internal ones for the entire ixgbe driver.
> 
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---

...

> @@ -3897,14 +3886,14 @@ static s32 ixgbe_get_ets_data(struct ixgbe_hw *hw, u16 *ets_cfg,
>   		return status;
>   
>   	if ((*ets_offset == 0x0000) || (*ets_offset == 0xFFFF))
> -		return IXGBE_NOT_IMPLEMENTED;
> +		return -ENOSYS;

Based on checkpatch, this doesn't look like a value we can use.

WARNING: ENOSYS means 'invalid syscall nr' and nothing else

>   	status = hw->eeprom.ops.read(hw, *ets_offset, ets_cfg);
>   	if (status)
>   		return status;
>   
>   	if ((*ets_cfg & IXGBE_ETS_TYPE_MASK) != IXGBE_ETS_TYPE_EMC_SHIFTED)
> -		return IXGBE_NOT_IMPLEMENTED;
> +		return -ENOSYS;
>   
>   	return 0;
>   }
> @@ -3927,7 +3916,7 @@ s32 ixgbe_get_thermal_sensor_data_generic(struct ixgbe_hw *hw)
>   
>   	/* Only support thermal sensors attached to physical port 0 */
>   	if ((IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1))
> -		return IXGBE_NOT_IMPLEMENTED;
> +		return -ENOSYS;
>   
>   	status = ixgbe_get_ets_data(hw, &ets_cfg, &ets_offset);
>   	if (status)
> @@ -3987,7 +3976,7 @@ s32 ixgbe_init_thermal_sensor_thresh_generic(struct ixgbe_hw *hw)
>   
>   	/* Only support thermal sensors attached to physical port 0 */
>   	if ((IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1))
> -		return IXGBE_NOT_IMPLEMENTED;
> +		return -ENOSYS;
>   
>   	status = ixgbe_get_ets_data(hw, &ets_cfg, &ets_offset);
>   	if (status)
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      reply	other threads:[~2023-12-07 23:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 11:28 [Intel-wired-lan] [PATCH iwl-next v2 0/2] ixgbe: Refactor ixgbe internal status Jedrzej Jagielski
2023-12-05 11:28 ` [Intel-wired-lan] [PATCH iwl-next v2 1/2] ixgbe: Refactor overtemp event handling Jedrzej Jagielski
2023-12-07 23:16   ` Tony Nguyen
2023-12-08  8:20     ` Jagielski, Jedrzej
2023-12-05 11:28 ` [Intel-wired-lan] [PATCH iwl-next v2 2/2] ixgbe: Refactor returning internal error codes Jedrzej Jagielski
2023-12-07 23:19   ` Tony Nguyen [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=14130a24-ec38-cdab-6dfc-8073c9335166@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jedrzej.jagielski@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox