Re: [RFC] File naming conventions in /drivers/subsystem folders


Tseng, Kuo-Lang <kuo-lang.tseng@...>
 

Thanks for all the feedbacks.

It looks that current naming has its value that outweighs what the proposed
naming can bring. So the current naming is staying and no filename changes.
I'll close this RFC with this conclusion for future reference.

Kuo

-----Original Message-----
From: Liu, Baohong
Sent: Thursday, June 30, 2016 10:04 AM
To: Mitsis, Peter <Peter.Mitsis(a)windriver.com>; Tseng, Kuo-Lang <kuo-
lang.tseng(a)intel.com>; devel(a)lists.zephyrproject.org
Subject: RE: [RFC] File naming conventions in /drivers/subsystem folders

Good and valid points.

We should keep what we have now.

Thanks
Baohong
-----Original Message-----
From: Mitsis, Peter [mailto:Peter.Mitsis(a)windriver.com]
Sent: Thursday, June 30, 2016 7:51 AM
To: Tseng, Kuo-Lang <kuo-lang.tseng(a)intel.com>; devel(a)lists.zephyrproject.org
Subject: [devel] Re: [RFC] File naming conventions in /drivers/subsystem folders

I am not clear what the added value of this proposed change brings. I get that there
is the redundancy in the full path name, but what is the problem of redundancy in
this case? The big advantage of the redundancy in this case is that it provides
contextual information for when the preceding path is not available. Consider the
following two case ...

1. If editing a file, the preceding path might not be shown in the title bar or tab.
This may make the editing of the files more error prone as it becomes easier to mix
up files "adc/dw.c" and "spi/dw.c".
2. A similar argument may apply to a printed file. The otherwise easily identified
contextual information may be lost if only the filename is shown on the
header/footer of the page.

What about use of the __FILE__ macro? Do we have cases where only the
filename would be displayed? If so, then this too increases the likelihood of
misidentifying a file.

Peter

-----Original Message-----
From: Tseng, Kuo-Lang [mailto:kuo-lang.tseng(a)intel.com]
Sent: June-29-16 8:50 PM
To: devel(a)lists.zephyrproject.org
Subject: [devel] [RFC] File naming conventions in /drivers/subsystem
folders

Hi,

Problem
*******
The current file naming of most files in /drivers/subsystem folders
starts with 'subsystem_something.[hc]'. The prefix part 'subsystem_'
can seem to be redundant as the subfolder where the file is located
already namespaces it.

e.g.
drivers/adc/adc_dw.[ch]

Proposed changes
***************
Remove the prefix 'subsystem_' from the filename. For example, some
current
naming:

drivers/adc/adc_dw.[ch]
drivers/adc/adc_qmsi.c
drivers/spi/spi_k64.c
drivers/spi/spi_dw.c
drivers/spi/spi_qmsi.c
...

would become:

drivers/adc/dw.[ch]
drivers/adc/qmsi.c
drivers/spi/k64.c
drivers/spi/dw.c
drivers/spi/qmsi.c

One side effect would be that now you would end up having files with
same filenames from different folder (e.g. qmsi.c). This may not be an
issue if each resides in their own folder.

Comments/concerns welcome.

Thanks,
Kuo, Inaky

Join devel@lists.zephyrproject.org to automatically receive all group messages.