net: netfilter: Use list_{next/prev}_entry instead of list_entry
Subsystems (3)
PATCH 1/1 net: netfilter: Use list_{next/prev}_entry instead of list_entry
This patch replace list_entry with list_prev_entry as it makes the code more clear to read.
Signed-off-by simran singhal <[email protected]>
--- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -1895,7 +1895,7 @@ static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net, goto nla_put_failure;if ((event !=NFT_MSG_DELRULE ) && (rule->list.prev != &chain->rules)) { - prule = list_entry(rule->list.prev, struct nft_rule, list); + prule =list_prev_entry (rule, list);if (nla_put_be64 (skb,NFTA_RULE_POSITION ,cpu_to_be64 (prule->handle),NFTA_RULE_PAD ))
Signature · 1 line
2.7.4
Pablo Neira Ayuso
maintainerQuoted 2 lines · simran singhal
This patch replace
list_entrywithlist_prev_entryas it makes the code more clear to read.
Also applied, thanks.