Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1450343
| From | Dexuan Cui <decui@microsoft.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets |
| Date | 2016-07-26 05:10 +0200 |
| Message-ID | <rZ0UN-53b-19@gated-at.bofh.it> (permalink) |
| References | <rXUy5-5oc-5@gated-at.bofh.it> <rYYzD-3py-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> From: David Miller [mailto:davem@davemloft.net]
>
> From: Dexuan Cui <decui@microsoft.com>
> Date: Sat, 23 Jul 2016 01:35:51 +0000
>
> > +static struct sock *hvsock_create(struct net *net, struct socket *sock,
> > + gfp_t priority, unsigned short type)
> > +{
> > + struct hvsock_sock *hvsk;
> > + struct sock *sk;
> > +
> > + sk = sk_alloc(net, AF_HYPERV, priority, &hvsock_proto, 0);
> > + if (!sk)
> > + return NULL;
> ...
> > + /* Looks stream-based socket doesn't need this. */
> > + sk->sk_backlog_rcv = NULL;
> > +
> > + sk->sk_state = 0;
> > + sock_reset_flag(sk, SOCK_DONE);
>
> All of these are unnecessary initializations, since sk_alloc() zeroes
> out the 'sk' object for you.
Hi David,
Thanks for the comment! I'll remove the 3 lines.
May I know if you have more comments?
BTW, during the past month, at least 7 other people also reviewed
the patch and gave me quite a few good comments, which have
been addressed. Though only one of them gave the Reviewed-by
line for now, I guess I would get more if I ping them to have a look
at the latest version of the patch, i.e., v19 -- I'm going to post it
with the aforementioned 3 lines removed and if you've more
comments, I'm ready to address them too. :-)
Thanks,
-- Dexuan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets David Miller <davem@davemloft.net> - 2016-07-26 02:40 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-26 05:10 +0200
Re: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets David Miller <davem@davemloft.net> - 2016-07-26 06:40 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-26 07:30 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-26 09:10 +0200
Re: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Michal Kubecek <mkubecek@suse.cz> - 2016-07-26 12:00 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-26 15:30 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-27 11:30 +0200
Re: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets David Miller <davem@davemloft.net> - 2016-07-26 19:50 +0200
RE: [PATCH v18 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-27 11:30 +0200
csiph-web