Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700251

Re: [PATCH] hyperv: netvsc: Neaten netvsc_send_pkt by using a temporary

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] hyperv: netvsc: Neaten netvsc_send_pkt by using a temporary
Date 2017-07-31 19:40 +0200
Message-ID <u9mPE-H2-27@gated-at.bofh.it> (permalink)
References <u93N0-5Ax-11@gated-at.bofh.it> <u9mmB-wZ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2017-07-31 at 10:05 -0700, Stephen Hemminger wrote:
> On Sun, 30 Jul 2017 14:19:30 -0700 Joe Perches <joe@perches.com> wrote:
> > Repeated dereference of nvmsg.msg.v1_msg.send_rndis_pkt can be
> > shortened by using a temporary.  Do so.
[]
> Looks good, several other places also suffer from to long.variable.name.wordiness.

My suggestion is to identify and fix those when you've time.

> > diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
[]
> > @@ -743,6 +743,7 @@ static inline int netvsc_send_pkt(
> >  	struct sk_buff *skb)
> >  {
> >  	struct nvsp_message nvmsg;
> > +	struct nvsp_1_message_send_rndis_packet *rpkt;
> 
> const?

I suppose.  It's an unusual style in the kernel though.

> This part just changed (got rid of indirection) in net-next.

No worries.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] hyperv: netvsc: Neaten netvsc_send_pkt by using a temporary Joe Perches <joe@perches.com> - 2017-07-30 23:20 +0200
  Re: [PATCH] hyperv: netvsc: Neaten netvsc_send_pkt by using a  temporary Stephen Hemminger <stephen@networkplumber.org> - 2017-07-31 19:10 +0200
    Re: [PATCH] hyperv: netvsc: Neaten netvsc_send_pkt by using a  temporary Joe Perches <joe@perches.com> - 2017-07-31 19:40 +0200

csiph-web