Commit 73ce2ac6 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'remove-useless-inline-functions-from-net'

Gaosheng Cui says:

====================
Remove useless inline functions from net
====================

Link: https://lore.kernel.org/r/20220922083857.1430811-1-cuigaosheng1@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 56378f3c 0b81882d
......@@ -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),
......
......@@ -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)
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment