netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info()
@ 2025-06-14 23:49 linux
  2025-06-16  9:57 ` Michal Swiatkowski
  2025-06-17 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2025-06-14 23:49 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, horms
  Cc: netdev, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

[Note, I'm wondering if actually this is a case of a missing call;
the other similar function is called in __verify_octeon_config_info(),
but I don't have or know the hardware.]

validate_cn23xx_pf_config_info() was added in 2016 by
commit 72c0091293c0 ("liquidio: CN23XX device init and sriov config")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 .../cavium/liquidio/cn23xx_pf_device.c        | 39 -------------------
 .../cavium/liquidio/cn23xx_pf_device.h        |  3 --
 2 files changed, 42 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
index ff8f2f9f9cae..75f22f74774c 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
@@ -1208,45 +1208,6 @@ int setup_cn23xx_octeon_pf_device(struct octeon_device *oct)
 }
 EXPORT_SYMBOL_GPL(setup_cn23xx_octeon_pf_device);
 
-int validate_cn23xx_pf_config_info(struct octeon_device *oct,
-				   struct octeon_config *conf23xx)
-{
-	if (CFG_GET_IQ_MAX_Q(conf23xx) > CN23XX_MAX_INPUT_QUEUES) {
-		dev_err(&oct->pci_dev->dev, "%s: Num IQ (%d) exceeds Max (%d)\n",
-			__func__, CFG_GET_IQ_MAX_Q(conf23xx),
-			CN23XX_MAX_INPUT_QUEUES);
-		return 1;
-	}
-
-	if (CFG_GET_OQ_MAX_Q(conf23xx) > CN23XX_MAX_OUTPUT_QUEUES) {
-		dev_err(&oct->pci_dev->dev, "%s: Num OQ (%d) exceeds Max (%d)\n",
-			__func__, CFG_GET_OQ_MAX_Q(conf23xx),
-			CN23XX_MAX_OUTPUT_QUEUES);
-		return 1;
-	}
-
-	if (CFG_GET_IQ_INSTR_TYPE(conf23xx) != OCTEON_32BYTE_INSTR &&
-	    CFG_GET_IQ_INSTR_TYPE(conf23xx) != OCTEON_64BYTE_INSTR) {
-		dev_err(&oct->pci_dev->dev, "%s: Invalid instr type for IQ\n",
-			__func__);
-		return 1;
-	}
-
-	if (!CFG_GET_OQ_REFILL_THRESHOLD(conf23xx)) {
-		dev_err(&oct->pci_dev->dev, "%s: Invalid parameter for OQ\n",
-			__func__);
-		return 1;
-	}
-
-	if (!(CFG_GET_OQ_INTR_TIME(conf23xx))) {
-		dev_err(&oct->pci_dev->dev, "%s: Invalid parameter for OQ\n",
-			__func__);
-		return 1;
-	}
-
-	return 0;
-}
-
 int cn23xx_fw_loaded(struct octeon_device *oct)
 {
 	u64 val;
diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
index 234b96b4f488..bbe9f3133b07 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
+++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
@@ -54,9 +54,6 @@ struct oct_vf_stats {
 
 int setup_cn23xx_octeon_pf_device(struct octeon_device *oct);
 
-int validate_cn23xx_pf_config_info(struct octeon_device *oct,
-				   struct octeon_config *conf23xx);
-
 u32 cn23xx_pf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us);
 
 int cn23xx_sriov_config(struct octeon_device *oct);
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info()
  2025-06-14 23:49 [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info() linux
@ 2025-06-16  9:57 ` Michal Swiatkowski
  2025-06-17 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Swiatkowski @ 2025-06-16  9:57 UTC (permalink / raw)
  To: linux
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms, netdev,
	linux-kernel

On Sun, Jun 15, 2025 at 12:49:41AM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> [Note, I'm wondering if actually this is a case of a missing call;
> the other similar function is called in __verify_octeon_config_info(),
> but I don't have or know the hardware.]
> 
> validate_cn23xx_pf_config_info() was added in 2016 by
> commit 72c0091293c0 ("liquidio: CN23XX device init and sriov config")
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
>  .../cavium/liquidio/cn23xx_pf_device.c        | 39 -------------------
>  .../cavium/liquidio/cn23xx_pf_device.h        |  3 --
>  2 files changed, 42 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
> index ff8f2f9f9cae..75f22f74774c 100644
> --- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
> +++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
> @@ -1208,45 +1208,6 @@ int setup_cn23xx_octeon_pf_device(struct octeon_device *oct)
>  }
>  EXPORT_SYMBOL_GPL(setup_cn23xx_octeon_pf_device);
>  
> -int validate_cn23xx_pf_config_info(struct octeon_device *oct,
> -				   struct octeon_config *conf23xx)
> -{
> -	if (CFG_GET_IQ_MAX_Q(conf23xx) > CN23XX_MAX_INPUT_QUEUES) {
> -		dev_err(&oct->pci_dev->dev, "%s: Num IQ (%d) exceeds Max (%d)\n",
> -			__func__, CFG_GET_IQ_MAX_Q(conf23xx),
> -			CN23XX_MAX_INPUT_QUEUES);
> -		return 1;
> -	}
> -
> -	if (CFG_GET_OQ_MAX_Q(conf23xx) > CN23XX_MAX_OUTPUT_QUEUES) {
> -		dev_err(&oct->pci_dev->dev, "%s: Num OQ (%d) exceeds Max (%d)\n",
> -			__func__, CFG_GET_OQ_MAX_Q(conf23xx),
> -			CN23XX_MAX_OUTPUT_QUEUES);
> -		return 1;
> -	}
> -
> -	if (CFG_GET_IQ_INSTR_TYPE(conf23xx) != OCTEON_32BYTE_INSTR &&
> -	    CFG_GET_IQ_INSTR_TYPE(conf23xx) != OCTEON_64BYTE_INSTR) {
> -		dev_err(&oct->pci_dev->dev, "%s: Invalid instr type for IQ\n",
> -			__func__);
> -		return 1;
> -	}
> -
> -	if (!CFG_GET_OQ_REFILL_THRESHOLD(conf23xx)) {
> -		dev_err(&oct->pci_dev->dev, "%s: Invalid parameter for OQ\n",
> -			__func__);
> -		return 1;
> -	}
> -
> -	if (!(CFG_GET_OQ_INTR_TIME(conf23xx))) {
> -		dev_err(&oct->pci_dev->dev, "%s: Invalid parameter for OQ\n",
> -			__func__);
> -		return 1;
> -	}
> -
> -	return 0;
> -}
> -
>  int cn23xx_fw_loaded(struct octeon_device *oct)
>  {
>  	u64 val;
> diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
> index 234b96b4f488..bbe9f3133b07 100644
> --- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
> +++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
> @@ -54,9 +54,6 @@ struct oct_vf_stats {
>  
>  int setup_cn23xx_octeon_pf_device(struct octeon_device *oct);
>  
> -int validate_cn23xx_pf_config_info(struct octeon_device *oct,
> -				   struct octeon_config *conf23xx);
> -

Looks like it was never used, even in the patch when it was introduced.
I wonder if it shouldn't go to __verify_octeon_config_info() for
OCTEON_CN23XX_PF_VID, but if it works for such long time, I think it is
fine to drop.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

>  u32 cn23xx_pf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us);
>  
>  int cn23xx_sriov_config(struct octeon_device *oct);
> -- 
> 2.49.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info()
  2025-06-14 23:49 [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info() linux
  2025-06-16  9:57 ` Michal Swiatkowski
@ 2025-06-17 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-17 23:20 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 15 Jun 2025 00:49:41 +0100 you wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> [Note, I'm wondering if actually this is a case of a missing call;
> the other similar function is called in __verify_octeon_config_info(),
> but I don't have or know the hardware.]
> 
> validate_cn23xx_pf_config_info() was added in 2016 by
> commit 72c0091293c0 ("liquidio: CN23XX device init and sriov config")
> 
> [...]

Here is the summary with links:
  - [net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info()
    https://git.kernel.org/netdev/net-next/c/5216b3b25018

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-17 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-14 23:49 [PATCH net-next] net: liquidio: Remove unused validate_cn23xx_pf_config_info() linux
2025-06-16  9:57 ` Michal Swiatkowski
2025-06-17 23:20 ` patchwork-bot+netdevbpf

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