RE: [V2 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

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

 



> -----Original Message-----
> From: David Miller
> Sent: Thursday, July 16, 2015 12:16
> 
> From: Dexuan Cui
> Date: Tue, 14 Jul 2015 02:58:56 -0700
> 
> > +int vmbus_sendpacket_hvsock(struct vmbus_channel *channel, void *buf,
> u32 len)
> > +{
> > +	struct vmpacket_descriptor desc;
> > +	struct vmpipe_proto_header pipe_hdr;
> > +	u32 packetlen;
> > +	u32 packetlen_aligned;
> > +	struct kvec bufferlist[4];
> > +	u64 aligned_data = 0;
> > +	int ret;
> > +	bool signal = false;
> 
> Reverse christmas-tree (longest to shortest line) order these local
> variables, please.
OK.

> 
> > +EXPORT_SYMBOL(vmbus_sendpacket_hvsock);
> 
> EXPORT_SYMBOL_GPL()
Oh, sorry. I'll fix it.
 
> > +int vmbus_recvpacket_hvsock(struct vmbus_channel *channel, void *buffer,
> > +				u32 bufferlen, u32 *buffer_actual_len)
> > +{
> > +	struct vmpacket_descriptor *desc;
> > +	struct vmpipe_proto_header *pipe_hdr;
> > +	u32 packet_len, payload_len;
> > +	int ret;
> > +	bool signal = false;
> 
> Again, please use reverse christmas-tree order.
OK.


> > +void vmbus_get_hvsock_rw_status(struct vmbus_channel *channel,
> > +			   bool *can_read, bool *can_write)
> 
> Second line is not properly indented, it should start exactly one
> column after the openning parenthesis on the previous line.
OK.
I didn't realize this issue. Thanks for reminding me!
The patch did pass the check of scripts/checkpatch.pl. :-)
I found scripts/Lindent can detect such kind of issue.
I'll run scripts/Lindent against my code and fix all of them in V3.

> > +	hv_get_ringbuffer_availbytes(inring_info,
> > +				bytes_avail_toread,
> > +				bytes_avail_towrite);
> 
> Again, improperly indented.
OK. will fix it.

> > +extern int vmbus_sendpacket_hvsock(struct vmbus_channel *channel,
> > +					void *buf, u32 len);
> > +
> 
> Likewise.
OK. will fix it.

> > +extern int vmbus_recvpacket_hvsock(struct vmbus_channel *channel, void
> *buffer,
> > +				u32 bufferlen, u32 *buffer_actual_len);
> > +
> > +extern void vmbus_get_hvsock_rw_status(struct vmbus_channel *channel,
> > +			   bool *can_read, bool *can_write);
> 
> Likewise.
OK. will fix it.

-- Dexuan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux