[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9ay49NsoC73dKXe@gmail.com>
Date: Sun, 16 Mar 2025 12:15:47 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
Ben Segall <bsegall@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Mel Gorman <mgorman@...e.de>, Peter Zijlstra <peterz@...radead.org>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v4 1/9] sched: Add a generic function to return the
preemption string.
* Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> +const char *preempt_modes[] = {
> + "none", "voluntary", "full", "lazy", NULL,
> +};
> + /* Count entries in NULL terminated preempt_modes */
> + for (j = 0; preempt_modes[j]; j++)
> + ;
I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)
Thanks,
Ingo
Powered by blists - more mailing lists