From: simran singhal Date: Wed, 29 Mar 2017 05:45:40 +0000 (+0530) Subject: net: netfilter: Use list_{next/prev}_entry instead of list_entry X-Git-Tag: v5.15~11411^2~32^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbbb40e2ec264bd63c410ff41cc8240c25419c49;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 7ba76da..22e191a 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1905,7 +1905,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))