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
| ||
|
Date: Sat, 25 May 2019 10:32:07 +0200 From: Ingo Molnar <mingo@...nel.org> To: Nadav Amit <namit@...are.com> Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Andy Lutomirski <luto@...nel.org>, Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org, "David S. Miller" <davem@...emloft.net> Subject: Re: [RFC PATCH 2/6] cpumask: Purify cpumask_next() * Nadav Amit <namit@...are.com> wrote: > cpumask_next() has no side-effects. Mark it as pure. > > Cc: "David S. Miller" <davem@...emloft.net> > Signed-off-by: Nadav Amit <namit@...are.com> > --- > include/linux/cpumask.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h > index 147bdec42215..20df46705f9c 100644 > --- a/include/linux/cpumask.h > +++ b/include/linux/cpumask.h > @@ -209,7 +209,7 @@ static inline unsigned int cpumask_last(const struct cpumask *srcp) > return find_last_bit(cpumask_bits(srcp), nr_cpumask_bits); > } > > -unsigned int cpumask_next(int n, const struct cpumask *srcp); > +unsigned int __pure cpumask_next(int n, const struct cpumask *srcp); I suppose this makes a code generation difference somewhere, right? I'm wondering, couldn't it also be marked a const function? That's supposedly an even better category. Thanks, Ingo
Powered by blists - more mailing lists