Skip to content

Commit 2560016

Browse files
author
Florian Westphal
committed
netfilter: nf_tables: de-constify set commit ops function argument
The set backend using this already has to work around this via ugly cast, don't spread this pattern. Signed-off-by: Florian Westphal <[email protected]>
1 parent cf8b7c1 commit 2560016

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

include/net/netfilter/nf_tables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ struct nft_set_ops {
462462
const struct nft_set *set,
463463
const struct nft_set_elem *elem,
464464
unsigned int flags);
465-
void (*commit)(const struct nft_set *set);
465+
void (*commit)(struct nft_set *set);
466466
void (*abort)(const struct nft_set *set);
467467
u64 (*privsize)(const struct nlattr * const nla[],
468468
const struct nft_set_desc *desc);

net/netfilter/nft_set_pipapo.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,12 +1549,11 @@ static void nft_pipapo_gc_deactivate(struct net *net, struct nft_set *set,
15491549

15501550
/**
15511551
* pipapo_gc() - Drop expired entries from set, destroy start and end elements
1552-
* @_set: nftables API set representation
1552+
* @set: nftables API set representation
15531553
* @m: Matching data
15541554
*/
1555-
static void pipapo_gc(const struct nft_set *_set, struct nft_pipapo_match *m)
1555+
static void pipapo_gc(struct nft_set *set, struct nft_pipapo_match *m)
15561556
{
1557-
struct nft_set *set = (struct nft_set *) _set;
15581557
struct nft_pipapo *priv = nft_set_priv(set);
15591558
struct net *net = read_pnet(&set->net);
15601559
int rules_f0, first_rule = 0;
@@ -1672,7 +1671,7 @@ static void pipapo_reclaim_match(struct rcu_head *rcu)
16721671
* We also need to create a new working copy for subsequent insertions and
16731672
* deletions.
16741673
*/
1675-
static void nft_pipapo_commit(const struct nft_set *set)
1674+
static void nft_pipapo_commit(struct nft_set *set)
16761675
{
16771676
struct nft_pipapo *priv = nft_set_priv(set);
16781677
struct nft_pipapo_match *new_clone, *old;

0 commit comments

Comments
 (0)