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: <1d0de89c-db09-0689-2528-5b6d90ad7192@quicinc.com>
Date:   Tue, 23 May 2023 12:17:35 +0530
From:   Mukesh Ojha <quic_mojha@...cinc.com>
To:     Arnd Bergmann <arnd@...nel.org>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
CC:     Arnd Bergmann <arnd@...db.de>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] sched: hide unused sched_update_scaling()



On 5/23/2023 1:20 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> This function is only used when CONFIG_SMP is enabled, without that there
> is no caller and no prototype:
> 
> kernel/sched/fair.c:688:5: error: no previous prototype for 'sched_update_scaling' [-Werror=missing-prototypes
> 
> Hide the definition in the same #ifdef check as the declaration.
> 
> Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

LGTM, thanks.
Reviewed-by: Mukesh Ojha <quic_mojha@...cinc.com>

-- Mukesh

> ---
>   kernel/sched/fair.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 48b6f0ca13ac..2c1b345c3b8d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq)
>   /**************************************************************
>    * Scheduling class statistics methods:
>    */
> -
> +#ifdef CONFIG_SMP
>   int sched_update_scaling(void)
>   {
>   	unsigned int factor = get_update_sysctl_factor();
> @@ -702,6 +702,7 @@ int sched_update_scaling(void)
>   	return 0;
>   }
>   #endif
> +#endif
>   
>   /*
>    * delta /= w

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ