netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next,v2 0/4] Remove useless inline functions from net
@ 2022-09-22  8:38 Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register Gaosheng Cui
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Gaosheng Cui @ 2022-09-22  8:38 UTC (permalink / raw)
  To: idosch, petrm, davem, edumazet, kuba, pabeni, cuigaosheng1; +Cc: netdev

v2:
  1. Take the wireless patch("mlxsw: reg: Remove unused inline function
  mlxsw_reg_sftr2_pack()")out of the series.
  2. Remove the entire SFTR-V2 register in the patch("mlxsw: reg: Remove
  deprecated code about SFTR-V2 Register").
  3. Change Subject prefix to "PATCH net-next".
  Thanks for taking time to review the patch.

v1:
  This series contains a few cleanup patches, to remove unused
  inline functions who's caller have been removed. Thanks!

Gaosheng Cui (4):
  mlxsw: reg: Remove deprecated code about SFTR-V2 Register
  neighbour: Remove unused inline function neigh_key_eq16()
  net: Remove unused inline function sk_nulls_node_init()
  net: Remove unused inline function dst_hold_and_use()

 drivers/net/ethernet/mellanox/mlxsw/reg.h | 71 -----------------------
 include/net/dst.h                         |  6 --
 include/net/neighbour.h                   |  5 --
 include/net/sock.h                        |  5 --
 4 files changed, 87 deletions(-)

-- 
2.25.1


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

* [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register
  2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
@ 2022-09-22  8:38 ` Gaosheng Cui
  2022-09-22 10:04   ` Ido Schimmel
  2022-09-22  8:38 ` [PATCH net-next,v2 2/4] neighbour: Remove unused inline function neigh_key_eq16() Gaosheng Cui
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Gaosheng Cui @ 2022-09-22  8:38 UTC (permalink / raw)
  To: idosch, petrm, davem, edumazet, kuba, pabeni, cuigaosheng1; +Cc: netdev

Remove all the code about SFTR-V2 Register which have been
deprecated since commit 77b7f83d5c25 ("mlxsw: Enable unified
bridge model").

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/net/ethernet/mellanox/mlxsw/reg.h | 71 -----------------------
 1 file changed, 71 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index d71d7f9a20f1..0777bed5bb1a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -2218,76 +2218,6 @@ static inline void mlxsw_reg_smpe_pack(char *payload, u16 local_port,
 	mlxsw_reg_smpe_evid_set(payload, evid);
 }
 
-/* SFTR-V2 - Switch Flooding Table Version 2 Register
- * --------------------------------------------------
- * The switch flooding table is used for flooding packet replication. The table
- * defines a bit mask of ports for packet replication.
- */
-#define MLXSW_REG_SFTR2_ID 0x202F
-#define MLXSW_REG_SFTR2_LEN 0x120
-
-MLXSW_REG_DEFINE(sftr2, MLXSW_REG_SFTR2_ID, MLXSW_REG_SFTR2_LEN);
-
-/* reg_sftr2_swid
- * Switch partition ID with which to associate the port.
- * Access: Index
- */
-MLXSW_ITEM32(reg, sftr2, swid, 0x00, 24, 8);
-
-/* reg_sftr2_flood_table
- * Flooding table index to associate with the specific type on the specific
- * switch partition.
- * Access: Index
- */
-MLXSW_ITEM32(reg, sftr2, flood_table, 0x00, 16, 6);
-
-/* reg_sftr2_index
- * Index. Used as an index into the Flooding Table in case the table is
- * configured to use VID / FID or FID Offset.
- * Access: Index
- */
-MLXSW_ITEM32(reg, sftr2, index, 0x00, 0, 16);
-
-/* reg_sftr2_table_type
- * See mlxsw_flood_table_type
- * Access: RW
- */
-MLXSW_ITEM32(reg, sftr2, table_type, 0x04, 16, 3);
-
-/* reg_sftr2_range
- * Range of entries to update
- * Access: Index
- */
-MLXSW_ITEM32(reg, sftr2, range, 0x04, 0, 16);
-
-/* reg_sftr2_port
- * Local port membership (1 bit per port).
- * Access: RW
- */
-MLXSW_ITEM_BIT_ARRAY(reg, sftr2, port, 0x20, 0x80, 1);
-
-/* reg_sftr2_port_mask
- * Local port mask (1 bit per port).
- * Access: WO
- */
-MLXSW_ITEM_BIT_ARRAY(reg, sftr2, port_mask, 0xA0, 0x80, 1);
-
-static inline void mlxsw_reg_sftr2_pack(char *payload,
-					unsigned int flood_table,
-					unsigned int index,
-					enum mlxsw_flood_table_type table_type,
-					unsigned int range, u16 port, bool set)
-{
-	MLXSW_REG_ZERO(sftr2, payload);
-	mlxsw_reg_sftr2_swid_set(payload, 0);
-	mlxsw_reg_sftr2_flood_table_set(payload, flood_table);
-	mlxsw_reg_sftr2_index_set(payload, index);
-	mlxsw_reg_sftr2_table_type_set(payload, table_type);
-	mlxsw_reg_sftr2_range_set(payload, range);
-	mlxsw_reg_sftr2_port_set(payload, port, set);
-	mlxsw_reg_sftr2_port_mask_set(payload, port, 1);
-}
-
 /* SMID-V2 - Switch Multicast ID Version 2 Register
  * ------------------------------------------------
  * The MID record maps from a MID (Multicast ID), which is a unique identifier
@@ -12833,7 +12763,6 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
 	MLXSW_REG(spvc),
 	MLXSW_REG(spevet),
 	MLXSW_REG(smpe),
-	MLXSW_REG(sftr2),
 	MLXSW_REG(smid2),
 	MLXSW_REG(cwtp),
 	MLXSW_REG(cwtpm),
-- 
2.25.1


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

* [PATCH net-next,v2 2/4] neighbour: Remove unused inline function neigh_key_eq16()
  2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register Gaosheng Cui
@ 2022-09-22  8:38 ` Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 3/4] net: Remove unused inline function sk_nulls_node_init() Gaosheng Cui
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Gaosheng Cui @ 2022-09-22  8:38 UTC (permalink / raw)
  To: idosch, petrm, davem, edumazet, kuba, pabeni, cuigaosheng1; +Cc: netdev

All uses of neigh_key_eq16() have
been removed since commit 1202cdd66531 ("Remove DECnet support
from kernel"), so remove it.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 include/net/neighbour.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 3827a6b395fd..20745cf7ae1a 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -276,11 +276,6 @@ static inline void *neighbour_priv(const struct neighbour *n)
 
 extern const struct nla_policy nda_policy[];
 
-static inline bool neigh_key_eq16(const struct neighbour *n, const void *pkey)
-{
-	return *(const u16 *)n->primary_key == *(const u16 *)pkey;
-}
-
 static inline bool neigh_key_eq32(const struct neighbour *n, const void *pkey)
 {
 	return *(const u32 *)n->primary_key == *(const u32 *)pkey;
-- 
2.25.1


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

* [PATCH net-next,v2 3/4] net: Remove unused inline function sk_nulls_node_init()
  2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 2/4] neighbour: Remove unused inline function neigh_key_eq16() Gaosheng Cui
@ 2022-09-22  8:38 ` Gaosheng Cui
  2022-09-22  8:38 ` [PATCH net-next,v2 4/4] net: Remove unused inline function dst_hold_and_use() Gaosheng Cui
  2022-09-26 19:40 ` [PATCH net-next,v2 0/4] Remove useless inline functions from net patchwork-bot+netdevbpf
  4 siblings, 0 replies; 7+ messages in thread
From: Gaosheng Cui @ 2022-09-22  8:38 UTC (permalink / raw)
  To: idosch, petrm, davem, edumazet, kuba, pabeni, cuigaosheng1; +Cc: netdev

All uses of sk_nulls_node_init() have
been removed since commit dbca1596bbb0 ("ping: convert to RCU
lookups, get rid of rwlock"), so remove it.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 include/net/sock.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 96a31026e35d..08038a385ef2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -744,11 +744,6 @@ static inline void sk_node_init(struct hlist_node *node)
 	node->pprev = NULL;
 }
 
-static inline void sk_nulls_node_init(struct hlist_nulls_node *node)
-{
-	node->pprev = NULL;
-}
-
 static inline void __sk_del_node(struct sock *sk)
 {
 	__hlist_del(&sk->sk_node);
-- 
2.25.1


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

* [PATCH net-next,v2 4/4] net: Remove unused inline function dst_hold_and_use()
  2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
                   ` (2 preceding siblings ...)
  2022-09-22  8:38 ` [PATCH net-next,v2 3/4] net: Remove unused inline function sk_nulls_node_init() Gaosheng Cui
@ 2022-09-22  8:38 ` Gaosheng Cui
  2022-09-26 19:40 ` [PATCH net-next,v2 0/4] Remove useless inline functions from net patchwork-bot+netdevbpf
  4 siblings, 0 replies; 7+ messages in thread
From: Gaosheng Cui @ 2022-09-22  8:38 UTC (permalink / raw)
  To: idosch, petrm, davem, edumazet, kuba, pabeni, cuigaosheng1; +Cc: netdev

All uses of dst_hold_and_use() have
been removed since commit 1202cdd66531 ("Remove DECnet support
from kernel"), so remove it.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 include/net/dst.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/net/dst.h b/include/net/dst.h
index 6aa252c3fc55..00b479ce6b99 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -239,12 +239,6 @@ static inline void dst_use_noref(struct dst_entry *dst, unsigned long time)
 	}
 }
 
-static inline void dst_hold_and_use(struct dst_entry *dst, unsigned long time)
-{
-	dst_hold(dst);
-	dst_use_noref(dst, time);
-}
-
 static inline struct dst_entry *dst_clone(struct dst_entry *dst)
 {
 	if (dst)
-- 
2.25.1


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

* Re: [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register
  2022-09-22  8:38 ` [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register Gaosheng Cui
@ 2022-09-22 10:04   ` Ido Schimmel
  0 siblings, 0 replies; 7+ messages in thread
From: Ido Schimmel @ 2022-09-22 10:04 UTC (permalink / raw)
  To: Gaosheng Cui; +Cc: petrm, davem, edumazet, kuba, pabeni, netdev

On Thu, Sep 22, 2022 at 04:38:54PM +0800, Gaosheng Cui wrote:
> Remove all the code about SFTR-V2 Register which have been
> deprecated since commit 77b7f83d5c25 ("mlxsw: Enable unified
> bridge model").
> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

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

* Re: [PATCH net-next,v2 0/4] Remove useless inline functions from net
  2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
                   ` (3 preceding siblings ...)
  2022-09-22  8:38 ` [PATCH net-next,v2 4/4] net: Remove unused inline function dst_hold_and_use() Gaosheng Cui
@ 2022-09-26 19:40 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-26 19:40 UTC (permalink / raw)
  To: Gaosheng Cui; +Cc: idosch, petrm, davem, edumazet, kuba, pabeni, netdev

Hello:

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

On Thu, 22 Sep 2022 16:38:53 +0800 you wrote:
> v2:
>   1. Take the wireless patch("mlxsw: reg: Remove unused inline function
>   mlxsw_reg_sftr2_pack()")out of the series.
>   2. Remove the entire SFTR-V2 register in the patch("mlxsw: reg: Remove
>   deprecated code about SFTR-V2 Register").
>   3. Change Subject prefix to "PATCH net-next".
>   Thanks for taking time to review the patch.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register
    https://git.kernel.org/netdev/net-next/c/a9c3abf4e576
  - [net-next,v2,2/4] neighbour: Remove unused inline function neigh_key_eq16()
    https://git.kernel.org/netdev/net-next/c/c8f01a4a5447
  - [net-next,v2,3/4] net: Remove unused inline function sk_nulls_node_init()
    https://git.kernel.org/netdev/net-next/c/d6755f37abfd
  - [net-next,v2,4/4] net: Remove unused inline function dst_hold_and_use()
    https://git.kernel.org/netdev/net-next/c/0b81882ddf8a

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] 7+ messages in thread

end of thread, other threads:[~2022-09-26 19:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22  8:38 [PATCH net-next,v2 0/4] Remove useless inline functions from net Gaosheng Cui
2022-09-22  8:38 ` [PATCH net-next,v2 1/4] mlxsw: reg: Remove deprecated code about SFTR-V2 Register Gaosheng Cui
2022-09-22 10:04   ` Ido Schimmel
2022-09-22  8:38 ` [PATCH net-next,v2 2/4] neighbour: Remove unused inline function neigh_key_eq16() Gaosheng Cui
2022-09-22  8:38 ` [PATCH net-next,v2 3/4] net: Remove unused inline function sk_nulls_node_init() Gaosheng Cui
2022-09-22  8:38 ` [PATCH net-next,v2 4/4] net: Remove unused inline function dst_hold_and_use() Gaosheng Cui
2022-09-26 19:40 ` [PATCH net-next,v2 0/4] Remove useless inline functions from net 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).