From: Mitsis, Peter [mailto:Peter.Mitsis(a)windriver.com]
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.
This is true. The fact that the side effect of some files ending up with same filename would be a major concern as that can cause this type of confusion and inconvenience as you pointed out in those cases. Perhaps that was the reason why the current naming:)
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:
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.