
On Sat, May 14, 2016 at 8:22 PM, Robert P. J. Day rpjday@crashcourse.ca wrote:
i know i asked something similar to this a while back, but a followup question ...
i'm aware of the value of a vendor's "common/" directory where, under "board/<vendor>/", one can establish a common directory to avoid all sorts of silly duplication, but it seems like some of that content is no longer even accessed.
first, in the top-level Makefile, it seems the *proper* way to set up a common directory is with its own Makefile, as in:
... snip ... HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
libs-y += lib/ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ ... snip ...
tackier alternatives appear to be, first, to have source files in a specific board directory "#include" source files from the common directory (hack! barf!). and, in some cases like under board/keymile/km83xx/, do something like this:
km83xx/Makefile:obj-y += km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
but i just noticed, in board/Marvell/common/, the source file memory.c, which seems totally unreferenced in any way. am i missing something? is there anything under /board/Marvell/* that, in some way, selects and compiles common/memory.c?
board/Marvell/common/memory.c is one of two files that still "use" the ancient GTREGREAD macro, the last definition of which has been removed from the source with d92866; the only other file that uses it is drivers/rtc/ds1302.c, where I just stumbled across it.
So, to answer your question: nope, the file wouldn't even compile :-)
I'd say post a patch series that axes both files on grounds of using undefined ancient macros (if somebody wants to rescue the DS1302 driver, they're welcome, but I doubt it, since no board in the tree uses it, anyway).
Best regards, Mario