From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpjday@crashcourse.ca (Robert P. J. Day) Date: Mon, 20 Jun 2016 08:54:53 -0400 (EDT) Subject: coding style: "obj-y" versus "obj-$(CONFIG_FOO)"? Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org a bit more pedantry ... in init/Makefile, i see this test: ifneq ($(CONFIG_BLK_DEV_INITRD),y) obj-y += noinitramfs.o else obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o endif which is perfectly correct, but since BLK_DEV_INITRD is defined as a boolean, it can be assigned only yes or no, so is there any reason that second assignment wasn't written simply as: obj-y += initramfs.o sure, it's picky, but whenever i see Makefile content of the form: obj-$(CONFIG_FOO) i take into account that that could be a tristate setting. if it isn't, it just makes more sense aesthetically to me to use "obj-y" for clarity. is there a coding style note about this sort of thing? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================