* [PATCH net-next RESEND 1/1] driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx
@ 2016-12-28 8:47 fgao
2016-12-28 19:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: fgao @ 2016-12-28 8:47 UTC (permalink / raw)
To: davem, maheshb, edumazet, netdev, gfree.wind; +Cc: Gao Feng
From: Gao Feng <fgao@ikuai8.com>
There are three functions which would invoke the ipvlan_count_rx. They
are ipvlan_process_multicast, ipvlan_rcv_frame, and ipvlan_nf_input.
The former two functions already use the ipvlan directly before
ipvlan_count_rx, and ipvlan_nf_input gets the ipvlan from
ipvl_addr->master, it is not possible to be NULL too.
So the ipvlan pointer check is unnecessary in ipvlan_count_rx.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
---
It is sent again because the last email is sent during net-next closed
drivers/net/ipvlan/ipvlan_core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index b4e9907..082f9f1 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -19,9 +19,6 @@ void ipvlan_init_secret(void)
static void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
unsigned int len, bool success, bool mcast)
{
- if (!ipvlan)
- return;
-
if (likely(success)) {
struct ipvl_pcpu_stats *pcptr;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next RESEND 1/1] driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx
2016-12-28 8:47 [PATCH net-next RESEND 1/1] driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx fgao
@ 2016-12-28 19:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-12-28 19:24 UTC (permalink / raw)
To: fgao; +Cc: maheshb, edumazet, netdev, gfree.wind
From: fgao@ikuai8.com
Date: Wed, 28 Dec 2016 16:47:42 +0800
> From: Gao Feng <fgao@ikuai8.com>
>
> There are three functions which would invoke the ipvlan_count_rx. They
> are ipvlan_process_multicast, ipvlan_rcv_frame, and ipvlan_nf_input.
> The former two functions already use the ipvlan directly before
> ipvlan_count_rx, and ipvlan_nf_input gets the ipvlan from
> ipvl_addr->master, it is not possible to be NULL too.
> So the ipvlan pointer check is unnecessary in ipvlan_count_rx.
>
> Signed-off-by: Gao Feng <fgao@ikuai8.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-28 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-28 8:47 [PATCH net-next RESEND 1/1] driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx fgao
2016-12-28 19:24 ` 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).