From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam01on0115.outbound.protection.outlook.com ([104.47.34.115]:46358 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755731AbeDIAey (ORCPT ); Sun, 8 Apr 2018 20:34:54 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Michael Kelley , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , KY Srinivasan , "martin.petersen@oracle.com" , "Michael Kelley (EOSG)" , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 292/293] cpumask: Make for_each_cpu_wrap() available on UP as well Date: Mon, 9 Apr 2018 00:26:45 +0000 Message-ID: <20180409002239.163177-292-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Michael Kelley [ Upstream commit d207af2eab3f8668b95ad02b21930481c42806fd ] for_each_cpu_wrap() was originally added in the #else half of a large "#if NR_CPUS =3D=3D 1" statement, but was omitted in the #if half. This patch adds the missing #if half to prevent compile errors when NR_CPUS is 1. Reported-by: kbuild test robot Signed-off-by: Michael Kelley Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kys@microsoft.com Cc: martin.petersen@oracle.com Cc: mikelley@microsoft.com Fixes: c743f0a5c50f ("sched/fair, cpumask: Export for_each_cpu_wrap()") Link: http://lkml.kernel.org/r/SN6PR1901MB2045F087F59450507D4FCC17CBF50@SN6= PR1901MB2045.namprd19.prod.outlook.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- include/linux/cpumask.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 2d65bbd6dbd1..c6d12da39c3a 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -164,6 +164,8 @@ static inline unsigned int cpumask_local_spread(unsigne= d int i, int node) for ((cpu) =3D 0; (cpu) < 1; (cpu)++, (void)mask) #define for_each_cpu_not(cpu, mask) \ for ((cpu) =3D 0; (cpu) < 1; (cpu)++, (void)mask) +#define for_each_cpu_wrap(cpu, mask, start) \ + for ((cpu) =3D 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start)) #define for_each_cpu_and(cpu, mask, and) \ for ((cpu) =3D 0; (cpu) < 1; (cpu)++, (void)mask, (void)and) #else --=20 2.15.1