All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES
@ 2021-05-26  2:10 chenxiang
  2021-05-26  9:30 ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: chenxiang @ 2021-05-26  2:10 UTC (permalink / raw)
  To: sh_def, catalin.marinas; +Cc: mm-commits, linuxarm, linuxarm, Xiang Chen

From: Xiang Chen <chenxiang66@hisilicon.com>

As kmemleak-test.c is moved to samples dir, it is not compiled if just
setting CONFIG_DEBUG_KMEMLEAK_TEST as module and enabling
CONFIG_DEBUG_KMEMLEAK. Because it depends on CONFIG_SAMPLES after it is
moved to samples dir.
So the dependency on CONFIG_SAMPLES is added.

Fixes: 1abbef4f5172 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir")
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 2779c29..9950542 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -716,7 +716,7 @@ config DEBUG_KMEMLEAK_MEM_POOL_SIZE
 
 config DEBUG_KMEMLEAK_TEST
 	tristate "Simple test for the kernel memory leak detector"
-	depends on DEBUG_KMEMLEAK && m
+	depends on DEBUG_KMEMLEAK && SAMPLES && m
 	help
 	  This option enables a module that explicitly leaks memory.
 
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES
  2021-05-26  2:10 [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES chenxiang
@ 2021-05-26  9:30 ` Catalin Marinas
  2021-05-27  6:42   ` chenxiang (M)
  0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2021-05-26  9:30 UTC (permalink / raw)
  To: chenxiang; +Cc: sh_def, mm-commits, linuxarm, linuxarm, Andrew Morton

On Wed, May 26, 2021 at 10:10:08AM +0800, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
> 
> As kmemleak-test.c is moved to samples dir, it is not compiled if just
> setting CONFIG_DEBUG_KMEMLEAK_TEST as module and enabling
> CONFIG_DEBUG_KMEMLEAK. Because it depends on CONFIG_SAMPLES after it is
> moved to samples dir.
> So the dependency on CONFIG_SAMPLES is added.
> 
> Fixes: 1abbef4f5172 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir")
> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 2779c29..9950542 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -716,7 +716,7 @@ config DEBUG_KMEMLEAK_MEM_POOL_SIZE
>  
>  config DEBUG_KMEMLEAK_TEST
>  	tristate "Simple test for the kernel memory leak detector"
> -	depends on DEBUG_KMEMLEAK && m
> +	depends on DEBUG_KMEMLEAK && SAMPLES && m
>  	help
>  	  This option enables a module that explicitly leaks memory.

Would it make more sense to move the DEBUG_KMEMLEAK_TEST option to
samples as well and maybe rename it to SAMPLES_KMEMLEAK?

-- 
Catalin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES
  2021-05-26  9:30 ` Catalin Marinas
@ 2021-05-27  6:42   ` chenxiang (M)
  0 siblings, 0 replies; 3+ messages in thread
From: chenxiang (M) @ 2021-05-27  6:42 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: sh_def, mm-commits, linuxarm, linuxarm, Andrew Morton

Hi Catalin,


在 2021/5/26 17:30, Catalin Marinas 写道:
> On Wed, May 26, 2021 at 10:10:08AM +0800, chenxiang wrote:
>> From: Xiang Chen <chenxiang66@hisilicon.com>
>>
>> As kmemleak-test.c is moved to samples dir, it is not compiled if just
>> setting CONFIG_DEBUG_KMEMLEAK_TEST as module and enabling
>> CONFIG_DEBUG_KMEMLEAK. Because it depends on CONFIG_SAMPLES after it is
>> moved to samples dir.
>> So the dependency on CONFIG_SAMPLES is added.
>>
>> Fixes: 1abbef4f5172 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir")
>> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
>> ---
>>   lib/Kconfig.debug | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>> index 2779c29..9950542 100644
>> --- a/lib/Kconfig.debug
>> +++ b/lib/Kconfig.debug
>> @@ -716,7 +716,7 @@ config DEBUG_KMEMLEAK_MEM_POOL_SIZE
>>   
>>   config DEBUG_KMEMLEAK_TEST
>>   	tristate "Simple test for the kernel memory leak detector"
>> -	depends on DEBUG_KMEMLEAK && m
>> +	depends on DEBUG_KMEMLEAK && SAMPLES && m
>>   	help
>>   	  This option enables a module that explicitly leaks memory.
> Would it make more sense to move the DEBUG_KMEMLEAK_TEST option to
> samples as well and maybe rename it to SAMPLES_KMEMLEAK?

Right, it seems be better to move the option to samples dir and rename it.
I will change it in next verison.

>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-27  6:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26  2:10 [PATCH] mm,kmemleak-test: add the dependency on CONFIG_SAMPLES chenxiang
2021-05-26  9:30 ` Catalin Marinas
2021-05-27  6:42   ` chenxiang (M)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.