Re: [PATCH v9 vfio 2/7] vfio/pds: Initial support for pds_vfio VFIO driver

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

 



On Thu, May 04, 2023 at 04:40:05PM -0700, Jakub Kicinski wrote:
> On Thu, 4 May 2023 19:41:54 -0300 Jason Gunthorpe wrote:
> > On Thu, May 04, 2023 at 01:20:01PM -0700, Jakub Kicinski wrote:
> > > On Thu, 4 May 2023 14:26:43 -0300 Jason Gunthorpe wrote:  
> > > > This GNU style of left aligning the function name should not be
> > > > in the kernel.  
> > > 
> > > FTR that's not a kernel-wide rule. Please scope your coding style
> > > suggestions to your subsystem, you may confuse people.  
> > 
> > It is what Documentation/process/coding-style.rst expects.
> 
> A reference to the section? You mean the vague mentions of the GNU
> coding style? 

Here I was looking at the "left indent the function name" - that is a
GNUism. IIRC the justification is it makes it easy to find the
function with 'grep "^func"'

Coding style says:

  Descendants are always substantially shorter than the parent and
  are placed substantially to the right.  A very commonly used style
  is to align descendants to a function open parenthesis.

So this patch had things like this:

 +static void
 +pds_vfio_pci_remove(struct pci_dev *pdev)

The first line is shorter than the second and the second is left not
right placed. It doesn't even need wrapping.

I know some people like to do this in some parts of the tree
regardless of coding-style. The GNU idea is sort of reasonable after
all.

> If the function declaration does not fit in 80 chars breaking the type
> off as a separate line is often a very reasonable choice.

Reasonable yes, but not "common" :)

> Anyway, I shouldn't complain, networking still has its odd rules.
> Probably why people making up rules for no strong reason is on my mind.

I usually try to ignore most of the style details, but this one stood
out. When I checked the series against clang-format it was pretty good
otherwise. A few minor fine tunings on some line wrapping :)

Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux