2021-06-09 16:04:08

by Tom Rix

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] fpga: reorganize to subdirs


On 6/9/21 7:53 AM, Greg KH wrote:
> On Wed, Jun 09, 2021 at 07:22:03AM -0700, [email protected] wrote:
>> From: Tom Rix <[email protected]>
>>
>> The incoming xrt patchset has a toplevel subdir xrt/
>> The current fpga/ uses a single dir with filename prefixes to subdivide owners
>> For consistency, there should be only one way to organize the fpga/ dir.
>> Because the subdir model scales better, refactor to use it.
>> The discussion wrt xrt is here:
>> https://lore.kernel.org/linux-fpga/[email protected]/
>>
>> Follow drivers/net/ethernet/ which has control configs
>> NET_VENDOR_BLA that map to drivers/net/ethernet/bla
>> Since fpgas do not have many vendors, drop the 'VENDOR' and use
>> FPGA_BLA.
>>
>> There are several new subdirs
>> altera/
>> dfl/
>> lattice/
>> xilinx/
>>
>> Each subdir has a Kconfig that has a new/reused
>>
>> if FPGA_BLA
>> ... existing configs ...
>> endif FPGA_BLA
>>
>> Which is sourced into the main fpga/Kconfig
>>
>> Each subdir has a Makefile whose transversal is controlled in the
>> fpga/Makefile by
>>
>> obj-$(CONFIG_FPGA_BLA) += bla/
>>
>> Some cleanup to arrange thing alphabetically and make fpga/Makefile's
>> whitespace look more like net/'s
>>
>> Changes from
>> v1
>> Drop renaming files
>> Cleanup makefiles
> You can rename the files, you just can not rename the .ko objects
> without everyone knowing what you are doing and you trying to bury it in
> the middle of a differently described patch.
>
> If you want to do that, do you? I don't really understand why you want
> to move things around right now other than "we have 40 files in one
> directory, ick!".

I am trying to resolve the layout inconsistency between what we have and
what the xrt patchset does.

The big issue is the files vs dirs.

Over specified filenames is secondary, so I dropped them.

40 files in one dir is itself not a problem.

having 40 files and an xrt/ is.

fpga/ layout should be consistent so the Makefile and Kconfig are easier
to maintain.

My preference is for subdir's.

Tom

>
> greg k-h
>


2021-06-09 16:41:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] fpga: reorganize to subdirs

On Wed, Jun 09, 2021 at 08:08:06AM -0700, Tom Rix wrote:
>
> On 6/9/21 7:53 AM, Greg KH wrote:
> > On Wed, Jun 09, 2021 at 07:22:03AM -0700, [email protected] wrote:
> > > From: Tom Rix <[email protected]>
> > >
> > > The incoming xrt patchset has a toplevel subdir xrt/
> > > The current fpga/ uses a single dir with filename prefixes to subdivide owners
> > > For consistency, there should be only one way to organize the fpga/ dir.
> > > Because the subdir model scales better, refactor to use it.
> > > The discussion wrt xrt is here:
> > > https://lore.kernel.org/linux-fpga/[email protected]/
> > >
> > > Follow drivers/net/ethernet/ which has control configs
> > > NET_VENDOR_BLA that map to drivers/net/ethernet/bla
> > > Since fpgas do not have many vendors, drop the 'VENDOR' and use
> > > FPGA_BLA.
> > >
> > > There are several new subdirs
> > > altera/
> > > dfl/
> > > lattice/
> > > xilinx/
> > >
> > > Each subdir has a Kconfig that has a new/reused
> > >
> > > if FPGA_BLA
> > > ... existing configs ...
> > > endif FPGA_BLA
> > >
> > > Which is sourced into the main fpga/Kconfig
> > >
> > > Each subdir has a Makefile whose transversal is controlled in the
> > > fpga/Makefile by
> > >
> > > obj-$(CONFIG_FPGA_BLA) += bla/
> > >
> > > Some cleanup to arrange thing alphabetically and make fpga/Makefile's
> > > whitespace look more like net/'s
> > >
> > > Changes from
> > > v1
> > > Drop renaming files
> > > Cleanup makefiles
> > You can rename the files, you just can not rename the .ko objects
> > without everyone knowing what you are doing and you trying to bury it in
> > the middle of a differently described patch.
> >
> > If you want to do that, do you? I don't really understand why you want
> > to move things around right now other than "we have 40 files in one
> > directory, ick!".
>
> I am trying to resolve the layout inconsistency between what we have and
> what the xrt patchset does.

Why does it matter? New stuff can be added to a new dir, why worry
about old stuff? What does it hurt?

> The big issue is the files vs dirs.
>
> Over specified filenames is secondary, so I dropped them.
>
> 40 files in one dir is itself not a problem.
>
> having 40 files and an xrt/ is.

Why is that a "problem"?

> fpga/ layout should be consistent so the Makefile and Kconfig are easier to
> maintain.

Is it somehow hard to maintain today? Seems pretty trivial to me...

thanks,

greg k-h

2021-06-09 18:46:48

by Tom Rix

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] fpga: reorganize to subdirs


On 6/9/21 9:38 AM, Greg KH wrote:
> On Wed, Jun 09, 2021 at 08:08:06AM -0700, Tom Rix wrote:
>> On 6/9/21 7:53 AM, Greg KH wrote:
>>> On Wed, Jun 09, 2021 at 07:22:03AM -0700, [email protected] wrote:
>>>> From: Tom Rix <[email protected]>
>>>>
>>>> The incoming xrt patchset has a toplevel subdir xrt/
>>>> The current fpga/ uses a single dir with filename prefixes to subdivide owners
>>>> For consistency, there should be only one way to organize the fpga/ dir.
>>>> Because the subdir model scales better, refactor to use it.
>>>> The discussion wrt xrt is here:
>>>> https://lore.kernel.org/linux-fpga/[email protected]/
>>>>
>>>> Follow drivers/net/ethernet/ which has control configs
>>>> NET_VENDOR_BLA that map to drivers/net/ethernet/bla
>>>> Since fpgas do not have many vendors, drop the 'VENDOR' and use
>>>> FPGA_BLA.
>>>>
>>>> There are several new subdirs
>>>> altera/
>>>> dfl/
>>>> lattice/
>>>> xilinx/
>>>>
>>>> Each subdir has a Kconfig that has a new/reused
>>>>
>>>> if FPGA_BLA
>>>> ... existing configs ...
>>>> endif FPGA_BLA
>>>>
>>>> Which is sourced into the main fpga/Kconfig
>>>>
>>>> Each subdir has a Makefile whose transversal is controlled in the
>>>> fpga/Makefile by
>>>>
>>>> obj-$(CONFIG_FPGA_BLA) += bla/
>>>>
>>>> Some cleanup to arrange thing alphabetically and make fpga/Makefile's
>>>> whitespace look more like net/'s
>>>>
>>>> Changes from
>>>> v1
>>>> Drop renaming files
>>>> Cleanup makefiles
>>> You can rename the files, you just can not rename the .ko objects
>>> without everyone knowing what you are doing and you trying to bury it in
>>> the middle of a differently described patch.
>>>
>>> If you want to do that, do you? I don't really understand why you want
>>> to move things around right now other than "we have 40 files in one
>>> directory, ick!".
>> I am trying to resolve the layout inconsistency between what we have and
>> what the xrt patchset does.
> Why does it matter? New stuff can be added to a new dir, why worry
> about old stuff? What does it hurt?
>
>> The big issue is the files vs dirs.
>>
>> Over specified filenames is secondary, so I dropped them.
>>
>> 40 files in one dir is itself not a problem.
>>
>> having 40 files and an xrt/ is.
> Why is that a "problem"?
>
>> fpga/ layout should be consistent so the Makefile and Kconfig are easier to
>> maintain.
> Is it somehow hard to maintain today? Seems pretty trivial to me...

This change was to help move xrt along.

If you are fine with xrt/, I will drop this patchset.

Tom

>
> thanks,
>
> greg k-h
>