2015-04-21 11:20:50

by Marcin Jabrzyk

[permalink] [raw]
Subject: [PATCH] zram: remove obsolete ZRAM_DEBUG option

This config option doesn't provide any usage for zram.

Signed-off-by: Marcin Jabrzyk <[email protected]>
---
drivers/block/zram/Kconfig | 10 +---------
drivers/block/zram/zram_drv.c | 4 ----
2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
index 6489c0fd0ea6..386ba3d1a6ee 100644
--- a/drivers/block/zram/Kconfig
+++ b/drivers/block/zram/Kconfig
@@ -23,12 +23,4 @@ config ZRAM_LZ4_COMPRESS
default n
help
This option enables LZ4 compression algorithm support. Compression
- algorithm can be changed using `comp_algorithm' device attribute.
-
-config ZRAM_DEBUG
- bool "Compressed RAM block device debug support"
- depends on ZRAM
- default n
- help
- This option adds additional debugging code to the compressed
- RAM block device driver.
+ algorithm can be changed using `comp_algorithm' device attribute.
\ No newline at end of file
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index fe67ebbe6c18..ea10f291d722 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -15,10 +15,6 @@
#define KMSG_COMPONENT "zram"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

-#ifdef CONFIG_ZRAM_DEBUG
-#define DEBUG
-#endif
-
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/bio.h>
--
1.9.1


2015-04-21 23:55:38

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: [PATCH] zram: remove obsolete ZRAM_DEBUG option

On (04/21/15 13:20), Marcin Jabrzyk wrote:
> This config option doesn't provide any usage for zram.
>

agree, there is no pr_debug() in the current zram. so the change
looks good to me.


btw, same stands for zsmalloc (for the time being):

#ifdef CONFIG_ZSMALLOC_DEBUG
#define DEBUG
#endif

seems to be useless. and there is even no ZSMALLOC_DEBUG config option
in mm/Kconfig.

so let's return back to it and clean up after the merge window.

-ss

> Signed-off-by: Marcin Jabrzyk <[email protected]>
> ---
> drivers/block/zram/Kconfig | 10 +---------
> drivers/block/zram/zram_drv.c | 4 ----
> 2 files changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
> index 6489c0fd0ea6..386ba3d1a6ee 100644
> --- a/drivers/block/zram/Kconfig
> +++ b/drivers/block/zram/Kconfig
> @@ -23,12 +23,4 @@ config ZRAM_LZ4_COMPRESS
> default n
> help
> This option enables LZ4 compression algorithm support. Compression
> - algorithm can be changed using `comp_algorithm' device attribute.
> -
> -config ZRAM_DEBUG
> - bool "Compressed RAM block device debug support"
> - depends on ZRAM
> - default n
> - help
> - This option adds additional debugging code to the compressed
> - RAM block device driver.
> + algorithm can be changed using `comp_algorithm' device attribute.
> \ No newline at end of file
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index fe67ebbe6c18..ea10f291d722 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -15,10 +15,6 @@
> #define KMSG_COMPONENT "zram"
> #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
>
> -#ifdef CONFIG_ZRAM_DEBUG
> -#define DEBUG
> -#endif
> -
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/bio.h>
> --
> 1.9.1
>

2015-04-22 06:39:37

by Marcin Jabrzyk

[permalink] [raw]
Subject: Re: [PATCH] zram: remove obsolete ZRAM_DEBUG option



On 22/04/15 01:55, Sergey Senozhatsky wrote:
> On (04/21/15 13:20), Marcin Jabrzyk wrote:
>> This config option doesn't provide any usage for zram.
>>
>
> agree, there is no pr_debug() in the current zram. so the change
> looks good to me.
>
>
> btw, same stands for zsmalloc (for the time being):
>
> #ifdef CONFIG_ZSMALLOC_DEBUG
> #define DEBUG
> #endif
>
> seems to be useless. and there is even no ZSMALLOC_DEBUG config option
> in mm/Kconfig.
I've forgot to add this too in the patch, but I've saw it at some time
earlier.
Anyway I'll prepare v2 with removal of both unused DEBUGs.
>
> so let's return back to it and clean up after the merge window.
I'll send v2 and eventually resend it after merge window closes.
>
> -ss
>
>> Signed-off-by: Marcin Jabrzyk <[email protected]>
>> ---
>> drivers/block/zram/Kconfig | 10 +---------
>> drivers/block/zram/zram_drv.c | 4 ----
>> 2 files changed, 1 insertion(+), 13 deletions(-)
>>
>> diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
>> index 6489c0fd0ea6..386ba3d1a6ee 100644
>> --- a/drivers/block/zram/Kconfig
>> +++ b/drivers/block/zram/Kconfig
>> @@ -23,12 +23,4 @@ config ZRAM_LZ4_COMPRESS
>> default n
>> help
>> This option enables LZ4 compression algorithm support. Compression
>> - algorithm can be changed using `comp_algorithm' device attribute.
>> -
>> -config ZRAM_DEBUG
>> - bool "Compressed RAM block device debug support"
>> - depends on ZRAM
>> - default n
>> - help
>> - This option adds additional debugging code to the compressed
>> - RAM block device driver.
>> + algorithm can be changed using `comp_algorithm' device attribute.
>> \ No newline at end of file
>> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
>> index fe67ebbe6c18..ea10f291d722 100644
>> --- a/drivers/block/zram/zram_drv.c
>> +++ b/drivers/block/zram/zram_drv.c
>> @@ -15,10 +15,6 @@
>> #define KMSG_COMPONENT "zram"
>> #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
>>
>> -#ifdef CONFIG_ZRAM_DEBUG
>> -#define DEBUG
>> -#endif
>> -
>> #include <linux/module.h>
>> #include <linux/kernel.h>
>> #include <linux/bio.h>
>> --
>> 1.9.1
>>
>

Best regards,
--
Marcin Jabrzyk
Samsung R&D Institute Poland
Samsung Electronics

2015-04-22 07:02:20

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: [PATCH] zram: remove obsolete ZRAM_DEBUG option

On (04/22/15 08:39), Marcin Jabrzyk wrote:
> >agree, there is no pr_debug() in the current zram. so the change
> >looks good to me.
> >
> >
> >btw, same stands for zsmalloc (for the time being):
> >
> > #ifdef CONFIG_ZSMALLOC_DEBUG
> > #define DEBUG
> > #endif
> >
> >seems to be useless. and there is even no ZSMALLOC_DEBUG config option
> >in mm/Kconfig.
> I've forgot to add this too in the patch, but I've saw it at some time
> earlier.
> Anyway I'll prepare v2 with removal of both unused DEBUGs.
> >
> >so let's return back to it and clean up after the merge window.
> I'll send v2 and eventually resend it after merge window closes.

a separate patch please.
one for zram (Andrew has picked it up already) and one for zsmalloc.

-ss

> >
> > -ss
> >
> >>Signed-off-by: Marcin Jabrzyk <[email protected]>
> >>---
> >> drivers/block/zram/Kconfig | 10 +---------
> >> drivers/block/zram/zram_drv.c | 4 ----
> >> 2 files changed, 1 insertion(+), 13 deletions(-)
> >>
> >>diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
> >>index 6489c0fd0ea6..386ba3d1a6ee 100644
> >>--- a/drivers/block/zram/Kconfig
> >>+++ b/drivers/block/zram/Kconfig
> >>@@ -23,12 +23,4 @@ config ZRAM_LZ4_COMPRESS
> >> default n
> >> help
> >> This option enables LZ4 compression algorithm support. Compression
> >>- algorithm can be changed using `comp_algorithm' device attribute.
> >>-
> >>-config ZRAM_DEBUG
> >>- bool "Compressed RAM block device debug support"
> >>- depends on ZRAM
> >>- default n
> >>- help
> >>- This option adds additional debugging code to the compressed
> >>- RAM block device driver.
> >>+ algorithm can be changed using `comp_algorithm' device attribute.
> >>\ No newline at end of file
> >>diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> >>index fe67ebbe6c18..ea10f291d722 100644
> >>--- a/drivers/block/zram/zram_drv.c
> >>+++ b/drivers/block/zram/zram_drv.c
> >>@@ -15,10 +15,6 @@
> >> #define KMSG_COMPONENT "zram"
> >> #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> >>
> >>-#ifdef CONFIG_ZRAM_DEBUG
> >>-#define DEBUG
> >>-#endif
> >>-
> >> #include <linux/module.h>
> >> #include <linux/kernel.h>
> >> #include <linux/bio.h>
> >>--
> >>1.9.1
> >>
> >
>
> Best regards,
> --
> Marcin Jabrzyk
> Samsung R&D Institute Poland
> Samsung Electronics
>

2015-04-22 08:52:56

by Marcin Jabrzyk

[permalink] [raw]
Subject: [PATCH v2 0/2] zram, zsmalloc: remove obsolete DEBUGs

This patchset removes unused DEBUG defines in zram and zsmalloc,
that remained in sources and config without actual usage.

Changes from v1:
- Apply the removal also to zsmalloc

Marcin Jabrzyk (2):
zram: remove obsolete ZRAM_DEBUG option
zsmalloc: remove obsolete ZSMALLOC_DEBUG

drivers/block/zram/Kconfig | 10 +---------
drivers/block/zram/zram_drv.c | 4 ----
mm/zsmalloc.c | 4 ----
3 files changed, 1 insertion(+), 17 deletions(-)

--
1.9.1

2015-04-22 08:53:39

by Marcin Jabrzyk

[permalink] [raw]
Subject: [PATCH v2 1/2] zram: remove obsolete ZRAM_DEBUG option

This config option doesn't provide any usage for zram.

Signed-off-by: Marcin Jabrzyk <[email protected]>
---
drivers/block/zram/Kconfig | 10 +---------
drivers/block/zram/zram_drv.c | 4 ----
2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
index 6489c0fd0ea6..386ba3d1a6ee 100644
--- a/drivers/block/zram/Kconfig
+++ b/drivers/block/zram/Kconfig
@@ -23,12 +23,4 @@ config ZRAM_LZ4_COMPRESS
default n
help
This option enables LZ4 compression algorithm support. Compression
- algorithm can be changed using `comp_algorithm' device attribute.
-
-config ZRAM_DEBUG
- bool "Compressed RAM block device debug support"
- depends on ZRAM
- default n
- help
- This option adds additional debugging code to the compressed
- RAM block device driver.
+ algorithm can be changed using `comp_algorithm' device attribute.
\ No newline at end of file
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index fe67ebbe6c18..ea10f291d722 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -15,10 +15,6 @@
#define KMSG_COMPONENT "zram"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

-#ifdef CONFIG_ZRAM_DEBUG
-#define DEBUG
-#endif
-
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/bio.h>
--
1.9.1

2015-04-22 08:53:37

by Marcin Jabrzyk

[permalink] [raw]
Subject: [PATCH v2 2/2] zsmalloc: remove obsolete ZSMALLOC_DEBUG

The DEBUG define in zsmalloc is useless, there
is no usage of it at all.

Signed-off-by: Marcin Jabrzyk <[email protected]>
---
mm/zsmalloc.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 08bd7a3d464a..33d512646379 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -45,10 +45,6 @@
*
*/

-#ifdef CONFIG_ZSMALLOC_DEBUG
-#define DEBUG
-#endif
-
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
--
1.9.1

2015-04-22 09:17:54

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] zram, zsmalloc: remove obsolete DEBUGs

On (04/22/15 10:52), Marcin Jabrzyk wrote:
>
> This patchset removes unused DEBUG defines in zram and zsmalloc,
> that remained in sources and config without actual usage.
>

Acked-by: Sergey Senozhatsky <[email protected]>

-ss

> Changes from v1:
> - Apply the removal also to zsmalloc
>
> Marcin Jabrzyk (2):
> zram: remove obsolete ZRAM_DEBUG option
> zsmalloc: remove obsolete ZSMALLOC_DEBUG
>
> drivers/block/zram/Kconfig | 10 +---------
> drivers/block/zram/zram_drv.c | 4 ----
> mm/zsmalloc.c | 4 ----
> 3 files changed, 1 insertion(+), 17 deletions(-)
>
> --
> 1.9.1
>