* [PATCH] net: netfilter: Use list_{next/prev}_entry instead of list_entry
@ 2017-03-29 5:45 simran singhal
2017-04-07 15:31 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: simran singhal @ 2017-03-29 5:45 UTC (permalink / raw)
To: pablo
Cc: Jozsef Kadlecsik, David S. Miller, netfilter-devel, coreteam,
netdev, linux-kernel, outreachy-kernel
This patch replace list_entry with list_prev_entry as it makes the
code more clear to read.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
net/netfilter/nf_tables_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index b7645d7..a341eaf 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -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))
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: netfilter: Use list_{next/prev}_entry instead of list_entry
2017-03-29 5:45 [PATCH] net: netfilter: Use list_{next/prev}_entry instead of list_entry simran singhal
@ 2017-04-07 15:31 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-07 15:31 UTC (permalink / raw)
To: simran singhal
Cc: Jozsef Kadlecsik, David S. Miller, netfilter-devel, coreteam,
netdev, linux-kernel, outreachy-kernel
On Wed, Mar 29, 2017 at 11:15:40AM +0530, simran singhal wrote:
> This patch replace list_entry with list_prev_entry as it makes the
> code more clear to read.
Also applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-07 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 5:45 [PATCH] net: netfilter: Use list_{next/prev}_entry instead of list_entry simran singhal
2017-04-07 15:31 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.