Re: [RFC PATCH 6/6] Drivers: hv: vmbus: Refactor the ring-buffer iterator functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 15, 2022 at 09:00:31AM +0200, Andrea Parri wrote:
> > > @@ -470,7 +471,6 @@ struct vmpacket_descriptor *hv_pkt_iter_first_raw(struct
> > > vmbus_channel *channel)
> > > 
> > >  	return (struct vmpacket_descriptor *)(hv_get_ring_buffer(rbi) + rbi-
> > > >priv_read_index);
> > >  }
> > > -EXPORT_SYMBOL_GPL(hv_pkt_iter_first_raw);
> > 
> > Does hv_pkt_iter_first_raw() need to be retained at all as a
> > separate function?  I think after these changes, the only caller
> > is hv_pkt_iter_first(), in which case the code could just go
> > inline in hv_pkt_iter_first().  Doing that combining would
> > also allow the elimination of the duplicate call to 
> > hv_pkt_iter_avail().

Back to this, can you clarify what you mean by "the elimination of..."?
After moving the function "inline", hv_pkt_iter_avail() would be called
in to check for a non-NULL descriptor (in the inline function) and later
in the computation of bytes_avail.

Thanks,
  Andrea


> 
> Good point.  Will do.
> 
> Thanks,
>   Andrea



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux