From 67cfbef371d8cc3ee0935b5503f6ba00ee2e261b Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Thu, 24 Aug 2017 15:44:46 +0200 Subject: [PATCH] ion: fix unmapped heap test settings **not for mainline** If one enables ION_DUMMY_UNMAPPED_HEAP without providing the target unmapped heap configuration settings (physical base address and size), the kernel cannot build. This situation occurs in Linux test build cases, i.e running the allmodconfig configuration. This change overcomes the issue by providing default null settings for both ION_DUMMY_UNMAPPED_BASE and ION_DUMMY_UNMAPPED_SIZE. Signed-off-by: Etienne Carriere Acked-by: Jens Wiklander --- drivers/staging/android/ion/Kconfig | 2 ++ drivers/staging/android/ion/ion_dummy_driver.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/Kconfig b/drivers/staging/android/ion/Kconfig index 851b8060243a9a..5218754c399a10 100644 --- a/drivers/staging/android/ion/Kconfig +++ b/drivers/staging/android/ion/Kconfig @@ -64,6 +64,7 @@ config ION_DUMMY_UNMAPPED_HEAP config ION_DUMMY_UNMAPPED_BASE hex "Physical base address of the ION unmapped heap" depends on ION_DUMMY_UNMAPPED_HEAP + default 0 help Allows one the statically define an unmapped heap from the ION dummy driver to exercice unamped heaps buffer managment. @@ -71,6 +72,7 @@ config ION_DUMMY_UNMAPPED_BASE config ION_DUMMY_UNMAPPED_SIZE hex "Physical byte size of the ION unmapped heap" depends on ION_DUMMY_UNMAPPED_HEAP + default 0 help Allows one the statically define an unmapped heap from the ION dummy driver to exercice unamped heaps buffer managment. diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c index c39009a2edd11b..504c379ab0367d 100644 --- a/drivers/staging/android/ion/ion_dummy_driver.c +++ b/drivers/staging/android/ion/ion_dummy_driver.c @@ -56,7 +56,7 @@ static struct ion_platform_heap dummy_heaps[] = { .align = SZ_16K, .priv = (void *)(SZ_16K), }, -#ifdef CONFIG_ION_DUMMY_UNMAPPED_HEAP +#if defined(CONFIG_ION_DUMMY_UNMAPPED_HEAP) && CONFIG_ION_DUMMY_UNMAPPED_SIZE { .id = ION_HEAP_TYPE_UNMAPPED, .type = ION_HEAP_TYPE_UNMAPPED,