diff mbox series

[V2,3/4] riscv: mm: Remove unused TASK_SIZE_MIN

Message ID 20231221154702.2267684-4-guoren@kernel.org (mailing list archive)
State Superseded
Headers show
Series riscv: mm: Fixup & Optimize COMPAT code | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-3-test-1 success .github/scripts/patches/build_rv32_defconfig.sh
conchuod/patch-3-test-2 success .github/scripts/patches/build_rv64_clang_allmodconfig.sh
conchuod/patch-3-test-3 success .github/scripts/patches/build_rv64_gcc_allmodconfig.sh
conchuod/patch-3-test-4 success .github/scripts/patches/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-3-test-5 success .github/scripts/patches/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-3-test-6 success .github/scripts/patches/checkpatch.sh
conchuod/patch-3-test-7 success .github/scripts/patches/dtb_warn_rv64.sh
conchuod/patch-3-test-8 success .github/scripts/patches/header_inline.sh
conchuod/patch-3-test-9 success .github/scripts/patches/kdoc.sh
conchuod/patch-3-test-10 success .github/scripts/patches/module_param.sh
conchuod/patch-3-test-11 success .github/scripts/patches/verify_fixes.sh
conchuod/patch-3-test-12 success .github/scripts/patches/verify_signedoff.sh

Commit Message

Guo Ren Dec. 21, 2023, 3:47 p.m. UTC
From: Guo Ren <guoren@linux.alibaba.com>

Remove TASK_SIZE_MIN because it's not used anymore.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
 arch/riscv/include/asm/pgtable.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Leonardo Bras Dec. 22, 2023, 4:49 a.m. UTC | #1
On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote:
> From: Guo Ren <guoren@linux.alibaba.com>
> 
> Remove TASK_SIZE_MIN because it's not used anymore.
> 
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> ---
>  arch/riscv/include/asm/pgtable.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 74ffb2178f54..e415582276ec 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>   */
>  #ifdef CONFIG_64BIT
>  #define TASK_SIZE_64	(PGDIR_SIZE * PTRS_PER_PGD / 2)
> -#define TASK_SIZE_MIN	(PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
>  
>  #ifdef CONFIG_COMPAT
>  #define TASK_SIZE_32	(_AC(0x80000000, UL))
> @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>  
>  #else
>  #define TASK_SIZE	FIXADDR_START
> -#define TASK_SIZE_MIN	TASK_SIZE
>  #endif
>  
>  #else /* CONFIG_MMU */
> -- 
> 2.40.1
> 

On torvalds/master:

$git grep TASK_SIZE_MIN
arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE
arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32
arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN      (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN      TASK_SIZE

I can only see definitions, without any usage, so agreed on removing them.

FWIW:
Reviewed-by: Leonardo Bras <leobras@redhat.com>

I would also send a patch for loongarch, since they are in the same boat :)

Thanks!
Leo
Guo Ren Dec. 22, 2023, 7:16 a.m. UTC | #2
On Fri, Dec 22, 2023 at 12:49 PM Leonardo Bras <leobras@redhat.com> wrote:
>
> On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote:
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > Remove TASK_SIZE_MIN because it's not used anymore.
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Signed-off-by: Guo Ren <guoren@kernel.org>
> > ---
> >  arch/riscv/include/asm/pgtable.h | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> > index 74ffb2178f54..e415582276ec 100644
> > --- a/arch/riscv/include/asm/pgtable.h
> > +++ b/arch/riscv/include/asm/pgtable.h
> > @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
> >   */
> >  #ifdef CONFIG_64BIT
> >  #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2)
> > -#define TASK_SIZE_MIN        (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
> >
> >  #ifdef CONFIG_COMPAT
> >  #define TASK_SIZE_32 (_AC(0x80000000, UL))
> > @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
> >
> >  #else
> >  #define TASK_SIZE    FIXADDR_START
> > -#define TASK_SIZE_MIN        TASK_SIZE
> >  #endif
> >
> >  #else /* CONFIG_MMU */
> > --
> > 2.40.1
> >
>
> On torvalds/master:
>
> $git grep TASK_SIZE_MIN
> arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE
> arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32
> arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN      (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
> arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN      TASK_SIZE
>
> I can only see definitions, without any usage, so agreed on removing them.
>
> FWIW:
> Reviewed-by: Leonardo Bras <leobras@redhat.com>
Thx

>
> I would also send a patch for loongarch, since they are in the same boat :)
Eh... I've sent one yesterday together.

https://lore.kernel.org/loongarch/20231221054624.2208019-1-guoren@kernel.org/

>
> Thanks!
> Leo
>
Leonardo Bras Dec. 22, 2023, 7:22 a.m. UTC | #3
On Fri, Dec 22, 2023 at 03:16:45PM +0800, Guo Ren wrote:
> On Fri, Dec 22, 2023 at 12:49 PM Leonardo Bras <leobras@redhat.com> wrote:
> >
> > On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote:
> > > From: Guo Ren <guoren@linux.alibaba.com>
> > >
> > > Remove TASK_SIZE_MIN because it's not used anymore.
> > >
> > > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > > Signed-off-by: Guo Ren <guoren@kernel.org>
> > > ---
> > >  arch/riscv/include/asm/pgtable.h | 2 --
> > >  1 file changed, 2 deletions(-)
> > >
> > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> > > index 74ffb2178f54..e415582276ec 100644
> > > --- a/arch/riscv/include/asm/pgtable.h
> > > +++ b/arch/riscv/include/asm/pgtable.h
> > > @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
> > >   */
> > >  #ifdef CONFIG_64BIT
> > >  #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2)
> > > -#define TASK_SIZE_MIN        (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
> > >
> > >  #ifdef CONFIG_COMPAT
> > >  #define TASK_SIZE_32 (_AC(0x80000000, UL))
> > > @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
> > >
> > >  #else
> > >  #define TASK_SIZE    FIXADDR_START
> > > -#define TASK_SIZE_MIN        TASK_SIZE
> > >  #endif
> > >
> > >  #else /* CONFIG_MMU */
> > > --
> > > 2.40.1
> > >
> >
> > On torvalds/master:
> >
> > $git grep TASK_SIZE_MIN
> > arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE
> > arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32
> > arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN      (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
> > arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN      TASK_SIZE
> >
> > I can only see definitions, without any usage, so agreed on removing them.
> >
> > FWIW:
> > Reviewed-by: Leonardo Bras <leobras@redhat.com>
> Thx
> 
> >
> > I would also send a patch for loongarch, since they are in the same boat :)
> Eh... I've sent one yesterday together.
> 
> https://lore.kernel.org/loongarch/20231221054624.2208019-1-guoren@kernel.org/

Awesome! :)

> 
> >
> > Thanks!
> > Leo
> >
> 
> 
> -- 
> Best Regards
>  Guo Ren
>
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 74ffb2178f54..e415582276ec 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -878,7 +878,6 @@  static inline pte_t pte_swp_clear_exclusive(pte_t pte)
  */
 #ifdef CONFIG_64BIT
 #define TASK_SIZE_64	(PGDIR_SIZE * PTRS_PER_PGD / 2)
-#define TASK_SIZE_MIN	(PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
 
 #ifdef CONFIG_COMPAT
 #define TASK_SIZE_32	(_AC(0x80000000, UL))
@@ -890,7 +889,6 @@  static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 
 #else
 #define TASK_SIZE	FIXADDR_START
-#define TASK_SIZE_MIN	TASK_SIZE
 #endif
 
 #else /* CONFIG_MMU */