[-next] x86: ia32.h: Remove unused code

Message ID 20230625125411.25840-1-yuehaibing@huawei.com
State New
Headers
Series [-next] x86: ia32.h: Remove unused code |

Commit Message

Yue Haibing June 25, 2023, 12:54 p.m. UTC
  Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support")
IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore.
And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind
ia32_pick_mmap_layout() extern declaration.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/x86/include/asm/ia32.h | 11 -----------
 1 file changed, 11 deletions(-)
  

Comments

Nikolay Borisov June 28, 2023, 1:16 p.m. UTC | #1
On 25.06.23 г. 15:54 ч., YueHaibing wrote:
> Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support")
> IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore.
> And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind
> ia32_pick_mmap_layout() extern declaration.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   arch/x86/include/asm/ia32.h | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h
> index fada857f0a1e..68f7eefe63d3 100644
> --- a/arch/x86/include/asm/ia32.h
> +++ b/arch/x86/include/asm/ia32.h
> @@ -57,17 +57,6 @@ struct stat64 {
>   	unsigned long long	st_ino;
>   } __attribute__((packed));
>   
> -#define IA32_STACK_TOP IA32_PAGE_OFFSET
> -
> -#ifdef __KERNEL__
> -struct linux_binprm;
> -extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
> -				unsigned long stack_top, int exec_stack);
> -struct mm_struct;
> -extern void ia32_pick_mmap_layout(struct mm_struct *mm);
> -
> -#endif
> -
>   #endif /* CONFIG_IA32_EMULATION */
>   
>   #endif /* _ASM_X86_IA32_H */


Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>

I've sent very similar patch (minus removal of IA32_STACK_TOP define) on 
12.06 - 
https://lore.kernel.org/all/20230612154438.638491-1-nik.borisov@suse.com/
  
Yue Haibing July 14, 2023, 3:16 a.m. UTC | #2
ping...

On 2023/6/25 20:54, YueHaibing wrote:
> Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support")
> IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore.
> And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind
> ia32_pick_mmap_layout() extern declaration.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  arch/x86/include/asm/ia32.h | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h
> index fada857f0a1e..68f7eefe63d3 100644
> --- a/arch/x86/include/asm/ia32.h
> +++ b/arch/x86/include/asm/ia32.h
> @@ -57,17 +57,6 @@ struct stat64 {
>  	unsigned long long	st_ino;
>  } __attribute__((packed));
>  
> -#define IA32_STACK_TOP IA32_PAGE_OFFSET
> -
> -#ifdef __KERNEL__
> -struct linux_binprm;
> -extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
> -				unsigned long stack_top, int exec_stack);
> -struct mm_struct;
> -extern void ia32_pick_mmap_layout(struct mm_struct *mm);
> -
> -#endif
> -
>  #endif /* CONFIG_IA32_EMULATION */
>  
>  #endif /* _ASM_X86_IA32_H */
>
  

Patch

diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h
index fada857f0a1e..68f7eefe63d3 100644
--- a/arch/x86/include/asm/ia32.h
+++ b/arch/x86/include/asm/ia32.h
@@ -57,17 +57,6 @@  struct stat64 {
 	unsigned long long	st_ino;
 } __attribute__((packed));
 
-#define IA32_STACK_TOP IA32_PAGE_OFFSET
-
-#ifdef __KERNEL__
-struct linux_binprm;
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
-				unsigned long stack_top, int exec_stack);
-struct mm_struct;
-extern void ia32_pick_mmap_layout(struct mm_struct *mm);
-
-#endif
-
 #endif /* CONFIG_IA32_EMULATION */
 
 #endif /* _ASM_X86_IA32_H */