From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 01 Aug 2014 12:54:59 -0600 Subject: [U-Boot] [PATCH 5/7] sunxi-common.h: Use new generic $bootcmd In-Reply-To: <1406879207-12322-5-git-send-email-hdegoede@redhat.com> References: <1406879207-12322-1-git-send-email-hdegoede@redhat.com> <1406879207-12322-5-git-send-email-hdegoede@redhat.com> Message-ID: <53DBE283.7000704@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/01/2014 01:46 AM, Hans de Goede wrote: > Use the new standard bootcmd from . Acked-by: Stephen Warren > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h > +#ifdef CONFIG_AHCI > +#define BOOT_TARGET_DEVICES(func) \ > + func(MMC, mmc, 0) \ > + func(SCSI, scsi, 0) \ > + func(USB, usb, 0) \ > + func(PXE, pxe, na) \ > + func(DHCP, dhcp, na) > +#else > +#define BOOT_TARGET_DEVICES(func) \ > + func(MMC, mmc, 0) \ > + func(USB, usb, 0) \ > + func(PXE, pxe, na) \ > + func(DHCP, dhcp, na) > +#endif In the spirit of using crazy macros (!) :-) I might code that as: #ifdef CONFIG_AHCI #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) #else #define BOOT_TARGET_DEVICES_SCSI(func) #endif #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) ... since it doesn't duplicate the rest of the main macro, but either way is fine by me.