Re: [PATCH for-next v4 05/12] RDMA/erdma: Add cmdq implementation

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

 



On Fri, Mar 18, 2022 at 07:16:08PM +0800, Wenpeng Liang wrote:
> On 2022/3/14 14:47, Cheng Xu wrote:
> <...>
> > +int erdma_cmdq_init(struct erdma_dev *dev)
> > +{
> > +	int err, i;
> > +	struct erdma_cmdq *cmdq = &dev->cmdq;
> > +	u32 status, ctrl;
> 
> Hi, Jason and Leon
> 
> Defining and initializing variables in the form of an inverted triangle at
> the head of the function can make the code clearer. The kernel's coding-style
> does not specify this behavior, and the various kernel subsystems do not seem
> to have formed a unified opinion. Does our RDMA subsystem recommend this?
> 
> struct erdma_cmdq *cmdq = &dev->cmdq;
> u32 status, ctrl;
> int err, i;

This is often called reverse christmas tree style

It is common in RDMA, but I would not insist on it.

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux