* [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() [not found] <cover.1523893788.git.lorenzo.bianconi@redhat.com> @ 2018-04-16 15:52 ` Lorenzo Bianconi 2018-04-16 15:56 ` Lorenzo Bianconi 2018-04-16 22:16 ` David Miller 0 siblings, 2 replies; 4+ messages in thread From: Lorenzo Bianconi @ 2018-04-16 15:52 UTC (permalink / raw) To: davem; +Cc: netdev Remove unnecessary check on update_lft variable in addrconf_prefix_rcv_add_addr routine since it is always set to 0. Moreover remove update_lft re-initialization to 0 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> --- net/ipv6/addrconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index dffa38004c13..b2c0175125db 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, if (IS_ERR_OR_NULL(ifp)) return -1; - update_lft = 0; create = 1; spin_lock_bh(&ifp->lock); ifp->flags |= IFA_F_MANAGETEMPADDR; @@ -2551,7 +2550,7 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, stored_lft = ifp->valid_lft - (now - ifp->tstamp) / HZ; else stored_lft = 0; - if (!update_lft && !create && stored_lft) { + if (!create && stored_lft) { const u32 minimum_lft = min_t(u32, stored_lft, MIN_VALID_LIFETIME); valid_lft = max(valid_lft, minimum_lft); -- 2.14.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() 2018-04-16 15:52 ` [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() Lorenzo Bianconi @ 2018-04-16 15:56 ` Lorenzo Bianconi 2018-04-16 17:00 ` David Miller 2018-04-16 22:16 ` David Miller 1 sibling, 1 reply; 4+ messages in thread From: Lorenzo Bianconi @ 2018-04-16 15:56 UTC (permalink / raw) To: David S. Miller; +Cc: netdev > Remove unnecessary check on update_lft variable in > addrconf_prefix_rcv_add_addr routine since it is always set to 0. > Moreover remove update_lft re-initialization to 0 > > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> > --- > net/ipv6/addrconf.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index dffa38004c13..b2c0175125db 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, > if (IS_ERR_OR_NULL(ifp)) > return -1; > > - update_lft = 0; > create = 1; > spin_lock_bh(&ifp->lock); > ifp->flags |= IFA_F_MANAGETEMPADDR; > @@ -2551,7 +2550,7 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, > stored_lft = ifp->valid_lft - (now - ifp->tstamp) / HZ; > else > stored_lft = 0; > - if (!update_lft && !create && stored_lft) { > + if (!create && stored_lft) { > const u32 minimum_lft = min_t(u32, > stored_lft, MIN_VALID_LIFETIME); > valid_lft = max(valid_lft, minimum_lft); > -- > 2.14.3 > I forgot 'net-next' tag in the subject. Dave should I send a v2? Regards, Lorenzo ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() 2018-04-16 15:56 ` Lorenzo Bianconi @ 2018-04-16 17:00 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2018-04-16 17:00 UTC (permalink / raw) To: lorenzo.bianconi; +Cc: netdev From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Date: Mon, 16 Apr 2018 17:56:33 +0200 > I forgot 'net-next' tag in the subject. Dave should I send a v2? Not necessary. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() 2018-04-16 15:52 ` [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() Lorenzo Bianconi 2018-04-16 15:56 ` Lorenzo Bianconi @ 2018-04-16 22:16 ` David Miller 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2018-04-16 22:16 UTC (permalink / raw) To: lorenzo.bianconi; +Cc: netdev From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Date: Mon, 16 Apr 2018 17:52:59 +0200 > Remove unnecessary check on update_lft variable in > addrconf_prefix_rcv_add_addr routine since it is always set to 0. > Moreover remove update_lft re-initialization to 0 > > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Applied to net-next, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-16 22:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1523893788.git.lorenzo.bianconi@redhat.com>
2018-04-16 15:52 ` [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr() Lorenzo Bianconi
2018-04-16 15:56 ` Lorenzo Bianconi
2018-04-16 17:00 ` David Miller
2018-04-16 22:16 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).