lib/raid6: drop RAID6_USE_EMPTY_ZERO_PAGE

Message ID 20221019160407.7550-1-giulio.benetti@benettiengineering.com
State New
Headers
Series lib/raid6: drop RAID6_USE_EMPTY_ZERO_PAGE |

Commit Message

Giulio Benetti Oct. 19, 2022, 4:04 p.m. UTC
  RAID6_USE_EMPTY_ZERO_PAGE is unused and hardcoded to 0, so let's drop it.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 include/linux/raid/pq.h | 8 --------
 lib/raid6/algos.c       | 2 --
 2 files changed, 10 deletions(-)
  

Comments

Christoph Hellwig Oct. 19, 2022, 4:10 p.m. UTC | #1
On Wed, Oct 19, 2022 at 06:04:07PM +0200, Giulio Benetti wrote:
> RAID6_USE_EMPTY_ZERO_PAGE is unused and hardcoded to 0, so let's drop it.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
  
Song Liu Oct. 20, 2022, 6:21 p.m. UTC | #2
On Wed, Oct 19, 2022 at 9:10 AM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Wed, Oct 19, 2022 at 06:04:07PM +0200, Giulio Benetti wrote:
> > RAID6_USE_EMPTY_ZERO_PAGE is unused and hardcoded to 0, so let's drop it.
>
> Looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Applied to md-next. Thanks!

Song
  

Patch

diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index d6e5a1feb947..f29aaaf2eb21 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -10,17 +10,9 @@ 
 
 #ifdef __KERNEL__
 
-/* Set to 1 to use kernel-wide empty_zero_page */
-#define RAID6_USE_EMPTY_ZERO_PAGE 0
 #include <linux/blkdev.h>
 
-/* We need a pre-zeroed page... if we don't want to use the kernel-provided
-   one define it here */
-#if RAID6_USE_EMPTY_ZERO_PAGE
-# define raid6_empty_zero_page empty_zero_page
-#else
 extern const char raid6_empty_zero_page[PAGE_SIZE];
-#endif
 
 #else /* ! __KERNEL__ */
 /* Used for testing in user space */
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c
index 39b74221f4a7..a22a05c9af8a 100644
--- a/lib/raid6/algos.c
+++ b/lib/raid6/algos.c
@@ -18,12 +18,10 @@ 
 #else
 #include <linux/module.h>
 #include <linux/gfp.h>
-#if !RAID6_USE_EMPTY_ZERO_PAGE
 /* In .bss so it's zeroed */
 const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256)));
 EXPORT_SYMBOL(raid6_empty_zero_page);
 #endif
-#endif
 
 struct raid6_calls raid6_call;
 EXPORT_SYMBOL_GPL(raid6_call);