From 1b4d39428eac80bc76713b1f21a2c85e8900c1b8 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 29 Jun 2015 15:47:34 -0700 Subject: libpayload: Make Kconfig bools use IS_ENABLED() This will make the code work with the different styles of Kconfig (emit unset bools vs don't emit unset bools) Roughly, the patch does this, and a little bit of fixing up: perl -pi -e 's,ifdef (CONFIG_LP_.+?)\b,if IS_ENABLED\($1\),g' `find . -name *.[ch]` perl -pi -e 's,ifndef (CONFIG_LP_.+?)\b,if !IS_ENABLED\($1\),g' `find . -name *.[ch]` Change-Id: Ib8a839b056a1f806a8597052e1b571ea3d18a79f Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10711 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/drivers/storage/ahci_ata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'payloads/libpayload/drivers/storage/ahci_ata.c') diff --git a/payloads/libpayload/drivers/storage/ahci_ata.c b/payloads/libpayload/drivers/storage/ahci_ata.c index a9380b647b..2c916fda49 100644 --- a/payloads/libpayload/drivers/storage/ahci_ata.c +++ b/payloads/libpayload/drivers/storage/ahci_ata.c @@ -56,7 +56,7 @@ ssize_t ahci_ata_read_sectors(ata_dev_t *const ata_dev, printf("ahci: Sector count too high (max. 256).\n"); count = 256; } -#ifdef CONFIG_LP_STORAGE_64BIT_LBA +#if IS_ENABLED(CONFIG_LP_STORAGE_64BIT_LBA) } else if (ata_dev->read_cmd == ATA_READ_DMA_EXT) { if (start >= (1ULL << 48)) { printf("ahci: Sector is not 48-bit addressable.\n"); @@ -84,7 +84,7 @@ ssize_t ahci_ata_read_sectors(ata_dev_t *const ata_dev, dev->cmdtable->fis[ 6] = (start >> 16) & 0xff; dev->cmdtable->fis[ 7] = FIS_H2D_DEV_LBA; dev->cmdtable->fis[ 8] = (start >> 24) & 0xff; -#ifdef CONFIG_LP_STORAGE_64BIT_LBA +#if IS_ENABLED(CONFIG_LP_STORAGE_64BIT_LBA) if (ata_dev->read_cmd == ATA_READ_DMA_EXT) { dev->cmdtable->fis[ 9] = (start >> 32) & 0xff; dev->cmdtable->fis[10] = (start >> 40) & 0xff; -- cgit v1.2.3