On Fri, 2016-03-25 at 16:40 -0400, David Miller wrote:
> From: Tom Herbert <t...@herbertland.com>
> Date: Wed, 23 Mar 2016 15:36:52 -0700
> 
> > +{
> > +     struct udp_sock *up = udp_sk(sk);
> > +     int is_udplite = IS_UDPLITE(sk);
> > +
> > +     int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
> > +
> 
> Small nit, please put this encap_rcv function pointer declaration at
> the top of the local variable list.

It might also be nice to remove the equivalent typedef and
use the same form in udp_tunnel.h
---
 include/net/udp_tunnel.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index b831140..71885b1 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -62,15 +62,12 @@ static inline int udp_sock_create(struct net *net,
        return -EPFNOSUPPORT;
 }
 
-typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
-typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
-
 struct udp_tunnel_sock_cfg {
        void *sk_user_data;     /* user data used by encap_rcv call back */
        /* Used for setting up udp_sock fields, see udp.h for details */
        __u8  encap_type;
-       udp_tunnel_encap_rcv_t encap_rcv;
-       udp_tunnel_encap_destroy_t encap_destroy;
+       int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
+       void (*encap_destroy)(struct sock *sk);
 };
 
 /* Setup the given (UDP) sock to receive UDP encapsulated packets */

Reply via email to