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

From: Joe Perches
Date: Mon Jul 31 2017 - 13:33:32 EST


On Mon, 2017-07-31 at 10:05 -0700, Stephen Hemminger wrote:
> On Sun, 30 Jul 2017 14:19:30 -0700 Joe Perches <joe@xxxxxxxxxxx> 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.