lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201113184055.GA1436703@ubuntu-m3-large-x86>
Date:   Fri, 13 Nov 2020 11:40:55 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Arnd Bergmann <arnd@...db.de>, Tom Rix <trix@...hat.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        clang-built-linux@...glegroups.com,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] futex: remove unused empty compat_exit_robust_list()

On Fri, Nov 13, 2020 at 06:20:12PM +0100, Lukas Bulwahn wrote:
> Commit ba31c1a48538 ("futex: Move futex exit handling into futex code")
> introduced compat_exit_robust_list() with a full-fledged implementation for
> CONFIG_COMPAT, and an empty-body function for !CONFIG_COMPAT.
> However, compat_exit_robust_list() is only used in futex_mm_release() under
> ifdef CONFIG_COMPAT.
> 
> Hence for !CONFIG_COMPAT, make CC=clang W=1 warns:
> 
>   kernel/futex.c:314:20:
>     warning: unused function 'compat_exit_robust_list' [-Wunused-function]
> 
> There is no need to declare the unused empty function for !CONFIG_COMPAT.
> Simply, remove it to address the -Wunused-function warning.
> 
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>

Reviewed-by: Nathan Chancellor <natechancellor@...il.com>

> ---
> applies cleanly on current master and next-20201113
> 
> Thomas, please pick this minor non-urgent clean-up patch.
> 
>  kernel/futex.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/futex.c b/kernel/futex.c
> index 00259c7e288e..c47d1015d759 100644
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -310,8 +310,6 @@ static inline bool should_fail_futex(bool fshared)
>  
>  #ifdef CONFIG_COMPAT
>  static void compat_exit_robust_list(struct task_struct *curr);
> -#else
> -static inline void compat_exit_robust_list(struct task_struct *curr) { }
>  #endif
>  
>  /*
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ