diff mbox series

[net-next,1/2] net: sparx5: Remove unused GLAG handling in PGID

Message ID 20220324113853.576803-2-casper.casan@gmail.com (mailing list archive)
State Accepted
Commit 264a9c5c9dff40f92a2a9ad1757d59a4438114fd
Delegated to: Netdev Maintainers
Headers show
Series net: sparx5: Refactor based on feedback on | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 28 this patch: 28
netdev/cc_maintainers warning 3 maintainers not CCed: bjarni.jonasson@microchip.com horatiu.vultur@microchip.com linux-arm-kernel@lists.infradead.org
netdev/build_clang success Errors and warnings before: 21 this patch: 21
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 31 this patch: 31
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 44 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Casper Andersson March 24, 2022, 11:38 a.m. UTC
Removes PGID handling for GLAG since it is not used
yet. According to feedback on previous patch.
https://lore.kernel.org/netdev/20220322081823.wqbx7vud4q7qtjuq@wse-c0155/T/#t

Signed-off-by: Casper Andersson <casper.casan@gmail.com>
---
 .../net/ethernet/microchip/sparx5/sparx5_main.h |  4 ----
 .../net/ethernet/microchip/sparx5/sparx5_pgid.c | 17 -----------------
 2 files changed, 21 deletions(-)

Comments

Steen Hegelund March 24, 2022, 2:33 p.m. UTC | #1
Hi Casper,

On Thu, 2022-03-24 at 12:38 +0100, Casper Andersson wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Removes PGID handling for GLAG since it is not used
> yet. According to feedback on previous patch.
> https://lore.kernel.org/netdev/20220322081823.wqbx7vud4q7qtjuq@wse-c0155/T/#t
> 
> Signed-off-by: Casper Andersson <casper.casan@gmail.com>
> ---
>  .../net/ethernet/microchip/sparx5/sparx5_main.h |  4 ----
>  .../net/ethernet/microchip/sparx5/sparx5_pgid.c | 17 -----------------
>  2 files changed, 21 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
> b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
> index 7a04b8f2a546..8e77d7ee8e68 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
> @@ -69,9 +69,6 @@ enum sparx5_vlan_port_type {
>  #define PGID_TABLE_SIZE               3290
> 
>  #define PGID_MCAST_START 65
> -#define PGID_GLAG_START 833
> -#define PGID_GLAG_END 1088
> -
>  #define IFH_LEN                9 /* 36 bytes */
>  #define NULL_VID               0
>  #define SPX5_MACT_PULL_DELAY   (2 * HZ)
> @@ -374,7 +371,6 @@ enum sparx5_pgid_type {
>         SPX5_PGID_FREE,
>         SPX5_PGID_RESERVED,
>         SPX5_PGID_MULTICAST,
> -       SPX5_PGID_GLAG
>  };
> 
>  void sparx5_pgid_init(struct sparx5 *spx5);
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
> b/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
> index 90366fcb9958..851a559269e1 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
> @@ -15,28 +15,11 @@ void sparx5_pgid_init(struct sparx5 *spx5)
>                 spx5->pgid_map[i] = SPX5_PGID_RESERVED;
>  }
> 
> -int sparx5_pgid_alloc_glag(struct sparx5 *spx5, u16 *idx)
> -{
> -       int i;
> -
> -       for (i = PGID_GLAG_START; i <= PGID_GLAG_END; i++)
> -               if (spx5->pgid_map[i] == SPX5_PGID_FREE) {
> -                       spx5->pgid_map[i] = SPX5_PGID_GLAG;
> -                       *idx = i;
> -                       return 0;
> -               }
> -
> -       return -EBUSY;
> -}
> -
>  int sparx5_pgid_alloc_mcast(struct sparx5 *spx5, u16 *idx)
>  {
>         int i;
> 
>         for (i = PGID_MCAST_START; i < PGID_TABLE_SIZE; i++) {
> -               if (i == PGID_GLAG_START)
> -                       i = PGID_GLAG_END + 1;
> -
>                 if (spx5->pgid_map[i] == SPX5_PGID_FREE) {
>                         spx5->pgid_map[i] = SPX5_PGID_MULTICAST;
>                         *idx = i;
> --
> 2.30.2
> 

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
index 7a04b8f2a546..8e77d7ee8e68 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h
@@ -69,9 +69,6 @@  enum sparx5_vlan_port_type {
 #define PGID_TABLE_SIZE	       3290
 
 #define PGID_MCAST_START 65
-#define PGID_GLAG_START 833
-#define PGID_GLAG_END 1088
-
 #define IFH_LEN                9 /* 36 bytes */
 #define NULL_VID               0
 #define SPX5_MACT_PULL_DELAY   (2 * HZ)
@@ -374,7 +371,6 @@  enum sparx5_pgid_type {
 	SPX5_PGID_FREE,
 	SPX5_PGID_RESERVED,
 	SPX5_PGID_MULTICAST,
-	SPX5_PGID_GLAG
 };
 
 void sparx5_pgid_init(struct sparx5 *spx5);
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c b/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
index 90366fcb9958..851a559269e1 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c
@@ -15,28 +15,11 @@  void sparx5_pgid_init(struct sparx5 *spx5)
 		spx5->pgid_map[i] = SPX5_PGID_RESERVED;
 }
 
-int sparx5_pgid_alloc_glag(struct sparx5 *spx5, u16 *idx)
-{
-	int i;
-
-	for (i = PGID_GLAG_START; i <= PGID_GLAG_END; i++)
-		if (spx5->pgid_map[i] == SPX5_PGID_FREE) {
-			spx5->pgid_map[i] = SPX5_PGID_GLAG;
-			*idx = i;
-			return 0;
-		}
-
-	return -EBUSY;
-}
-
 int sparx5_pgid_alloc_mcast(struct sparx5 *spx5, u16 *idx)
 {
 	int i;
 
 	for (i = PGID_MCAST_START; i < PGID_TABLE_SIZE; i++) {
-		if (i == PGID_GLAG_START)
-			i = PGID_GLAG_END + 1;
-
 		if (spx5->pgid_map[i] == SPX5_PGID_FREE) {
 			spx5->pgid_map[i] = SPX5_PGID_MULTICAST;
 			*idx = i;