All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: remove unneeded constructor.
@ 2018-07-31  5:15 Yoshinori Sato
  2018-08-01  7:42   ` Geert Uytterhoeven
  0 siblings, 1 reply; 35+ messages in thread
From: Yoshinori Sato @ 2018-07-31  5:15 UTC (permalink / raw)
  To: linux-sh

pgd_cache specifies __GFP_ZERO when allocating.
This constructor is meaningless.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/sh/mm/pgtable.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/arch/sh/mm/pgtable.c b/arch/sh/mm/pgtable.c
index 5c8f9247c3c2..4b8be7525fba 100644
--- a/arch/sh/mm/pgtable.c
+++ b/arch/sh/mm/pgtable.c
@@ -9,20 +9,11 @@ static struct kmem_cache *pgd_cachep;
 static struct kmem_cache *pmd_cachep;
 #endif
 
-void pgd_ctor(void *x)
-{
-	pgd_t *pgd = x;
-
-	memcpy(pgd + USER_PTRS_PER_PGD,
-	       swapper_pg_dir + USER_PTRS_PER_PGD,
-	       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
-}
-
 void pgtable_cache_init(void)
 {
 	pgd_cachep = kmem_cache_create("pgd_cache",
 				       PTRS_PER_PGD * (1<<PTE_MAGNITUDE),
-				       PAGE_SIZE, SLAB_PANIC, pgd_ctor);
+				       PAGE_SIZE, SLAB_PANIC, NULL);
 #if PAGETABLE_LEVELS > 2
 	pmd_cachep = kmem_cache_create("pmd_cache",
 				       PTRS_PER_PMD * (1<<PTE_MAGNITUDE),
-- 
2.11.0


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

end of thread, other threads:[~2020-06-08 13:01 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31  5:15 [PATCH] sh: remove unneeded constructor Yoshinori Sato
2018-08-01  7:42 ` Geert Uytterhoeven
2018-08-01  7:42   ` Geert Uytterhoeven
2018-08-01 11:13   ` Yoshinori Sato
2018-08-01 11:13     ` Yoshinori Sato
2018-08-04 10:35     ` Matthew Wilcox
2018-08-04 10:35       ` Matthew Wilcox
2018-08-04 10:47       ` Geert Uytterhoeven
2018-08-04 10:47         ` Geert Uytterhoeven
2018-08-04 10:51         ` Matthew Wilcox
2018-08-04 10:51           ` Matthew Wilcox
2018-08-05 15:54           ` Rob Landley
2018-08-05 15:54             ` Rob Landley
2018-08-05 16:32             ` Rich Felker
2018-08-05 16:32               ` Rich Felker
2018-08-05 22:48               ` Rob Landley
2018-08-05 22:48                 ` Rob Landley
2018-08-05 23:33                 ` Rich Felker
2018-08-05 23:33                   ` Rich Felker
2018-08-06  6:57                   ` Geert Uytterhoeven
2018-08-06  6:57                     ` Geert Uytterhoeven
2018-08-06  8:53                     ` Arnd Bergmann
2018-08-06  8:53                       ` Arnd Bergmann
2018-08-10 18:18                     ` Rob Landley
2018-08-10 18:18                       ` Rob Landley
2020-06-06 16:32           ` Rich Felker
2020-06-06 16:32             ` Rich Felker
2020-06-08 13:01             ` Matthew Wilcox
2020-06-08 13:01               ` Matthew Wilcox
2018-08-01 11:20   ` Matthew Wilcox
2018-08-01 11:20     ` Matthew Wilcox
2018-08-01 23:02     ` Rich Felker
2018-08-01 23:02       ` Rich Felker
2018-08-02  2:47       ` Matthew Wilcox
2018-08-02  2:47         ` Matthew Wilcox

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.