From patchwork Mon Aug 13 21:55:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 144052 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3567824ljj; Mon, 13 Aug 2018 14:56:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyOk+C/QN7qILkcWOt0m08oeHSruB5WmYbWoAKHNg2gC/62QlgNkh7VExNz+CpvfXMD0P+/ X-Received: by 2002:a63:380d:: with SMTP id f13-v6mr18588731pga.124.1534197384455; Mon, 13 Aug 2018 14:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534197384; cv=none; d=google.com; s=arc-20160816; b=iuHrBxdpMLSpkDuJP2D1PB297aCxNVBqKSptk77sAnHhE5rDjFmWjGRqMmvMcIYJln zAwzJudNAT/f3xI+fknaK5FUXZHh9t4z0UHvG5bQWst/G3j1F8SlQzuHIJflg/snlqqf 2pKXC98OnaVWipT8E6M9tGHWROzK/EHDXxM3r2mljN6f3IqS+roCDGpwF6vDb31zvmi7 xSffXwPB+yzAV6388Q4thkcDLMg1pNstU4rVDGfWdoM0srcrctXifc6kaDTiTj/iyuD/ S2PiIdnFVvV7qSOzo2RcInUb9jrBlHwzzM1diQpLSJJa7YAuqoiVyk5okvqC5CRkjFch KFow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=dRd7MP/MDYBJ36fyAUd+n3SNvEVJAPHBF1z5ywIx4ZQ=; b=m9ti9jjCgme1AsjPGgc3bmHd7qI50GMVTkkJQfXsuA6I9jKEM0xzxEtT5aDvpa3asb fXH1KG65QliNy3COjeoSkoZFdrKj/EAJ2jnlglStINzbLwdKyn16v0PHRjEQi6eb31cd opeW/7LxVp6bVFYlwtNGtByifoe3kfwndJWdazFtqAYKcbbupGXIt8f3nabnEor4kBpT sO13L6AMlbg6s4fcV4/RXtmeD5wbs0J8Ycg44NV+xi1pHiMY2O0b+5JOAHg7Zz0ZNu/0 U1sAS5OZnJN+vnhH9lOQHO+c0JQNLnFEefqHgQ7YJD1fmJZ8L1OKUsfsRFephdCLdfYl 6wNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a140-v6si20449720pfd.35.2018.08.13.14.56.23; Mon, 13 Aug 2018 14:56:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730892AbeHNAk0 (ORCPT + 31 others); Mon, 13 Aug 2018 20:40:26 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:34929 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729102AbeHNAk0 (ORCPT ); Mon, 13 Aug 2018 20:40:26 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0Mefpk-1fVRQD2dqq-00OKnk; Mon, 13 Aug 2018 23:55:49 +0200 From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Peter Zijlstra , Caleb Raitto , Willem de Bruijn , "David S . Miller" , Alexey Dobriyan , Ingo Molnar , Rakib Mullick , Amritha Nambiar , Michael Kelley , linux-kernel@vger.kernel.org Subject: [PATCH] cpumask: provide a dummy cpumask_next_wrap Date: Mon, 13 Aug 2018 23:55:16 +0200 Message-Id: <20180813215546.3828228-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:GEKQvB0OLegPjxawkU6Q92FCcY/YUHkLkv1i1eZsa730jHhi5oN aDs7AI9anXePr+Za1QtTxeSBLSj6wgoFUyR1/w0oqY5NaaH4ljEYIx2KSE2JQwbiMFutDeL FTTb8tvL9yt1IQK3pBw2Xy7uO4NputLJBZ8Jb6U0/Y6cA7YTqKCl3yJcA57gBi2+oXKCVyz BK8ghIR6yBoHG03R3O45w== X-UI-Out-Filterresults: notjunk:1; V01:K0:hArcw6AVpbQ=:t6avqwnT3hZNCaXolROhQJ 3fkbcUHCk8N5ERL9hZxIKvEoiup6aBuZcX45yaw7KkFxEc8R+7T2sQug67x5C9zE0GaG8DX0P PdLjUXAulfiUa5igapIU2EgmEHBjeVXEJcJTfOiA8oNHJasMhl3lm6xhKqlGWRyjRIshg052X PLRZQtQvUVdpMKK0F4anF0ijZvGe5t2FzGFM4MUP9GS0bjQAYEbBVdCLr2b3flQ2uV8kA0784 A4JNXplXcwsLgq2ynousoto9f/6fASka1QCX1zlBe8C4/hS49jkvj3VgmanckQxlGrIRz3Ghb XI6tuvJtv+5QKWBwk8IU2Zvfk9WBJoXKrmApKXwzJ8ruD+0hh1T7SRk3+ARfXP6oHX5LkL8nk 6UGSH+DWD2IxcDvkFzHpyDDj1Mm+vSx88ijdPUjVUI1rPFs9jZjGGSvuy+GAh6BfTZWLCodCA B3rFuh6F+nzaGHdTDI4iPWSJn0dPKh/4XDkZEKo8KAIUbjMVvHX6FiopvklAEVKaoALp+Dpuc nBeq/IQrtX+Q6BCDhWZB2VkeOuigRS/WF/bTRvYSZwTD8fsWbYRSTkzC4TcIuGpofmBGWveKF hO+VBHQWERkvjWi1wQ+jXwrFQ8T5Z3aPSXxyfK1wBjgUmtpe5oDeghTcUl0dbbm1ZVwFh0/y9 zlS03PvlGWnTVkJhc7kGRJjIlBvBcYmzP8q8EOGddAf7WHFGNoaGHJ0A1VKE+Nurg1z4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The virtio_net driver has become the first one to call cpumask_next_wrap() even if CONFIG_SMP is disabled, leading to a build error: drivers/net/virtio_net.c: In function 'virtnet_set_affinity': drivers/net/virtio_net.c:1916:10: error: implicit declaration of function 'cpumask_next_wrap'; did you mean 'cpumask_next_and'? [-Werror=implicit-function-declaration] cpu = cpumask_next_wrap(cpu, cpu_online_mask, Add a stub function along the lines of cpumask_first(), cpumask_next() etc. I'm not entirely sure what should be returned in this case, but at least for virtio_net, anything should work. Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.") Cc: Peter Zijlstra Cc: Caleb Raitto Cc: Willem de Bruijn Cc: David S. Miller Signed-off-by: Arnd Bergmann --- include/linux/cpumask.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.18.0 diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 57f20a0a7794..079ba06309bd 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -159,6 +159,11 @@ static inline unsigned int cpumask_next_and(int n, return n+1; } +static inline int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap) +{ + return n; +} + /* cpu must be a valid cpu, ie 0, so there's no other choice. */ static inline unsigned int cpumask_any_but(const struct cpumask *mask, unsigned int cpu)