[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150715.211608.1179325069980931613.davem@davemloft.net>
Date: Wed, 15 Jul 2015 21:16:08 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: decui@...rosoft.com
Cc: gregkh@...uxfoundation.org, stephen@...workplumber.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
driverdev-devel@...uxdriverproject.org, olaf@...fle.de,
apw@...onical.com, jasowang@...hat.com, kys@...rosoft.com
Subject: Re: [V2 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock
packet and get the r/w-ability
From: Dexuan Cui <decui@...rosoft.com>
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.
> +EXPORT_SYMBOL(vmbus_sendpacket_hvsock);
EXPORT_SYMBOL_GPL()
> +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.
> +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.
> + hv_get_ringbuffer_availbytes(inring_info,
> + bytes_avail_toread,
> + bytes_avail_towrite);
Again, improperly indented.
> +extern int vmbus_sendpacket_hvsock(struct vmbus_channel *channel,
> + void *buf, u32 len);
> +
Likewise.
> +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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists