Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1013784yba; Thu, 4 Apr 2019 02:26:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBWxSrUlXxEsdy0CqPF0kYUs5ZmKYR3P7b1BGk0GN+6J/pbJ9TBJbKeaLR0k+0uAdlruIu X-Received: by 2002:a63:e70c:: with SMTP id b12mr4556858pgi.399.1554369988280; Thu, 04 Apr 2019 02:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554369988; cv=none; d=google.com; s=arc-20160816; b=zQqzC+9C0qM2kjQjbh8CgYToFVRw8JifwKmvXFPyEGupFO2h1Vbra0Y28Sfdbfujcv vJDPXj1zc4nmGy2ZmCynW58J68sskLCUUm/FIuYHxpTEE348Ca/74C0VRJMhYOMdv3OB ifZoSZCciePvhnCWdhzhS6Wekdtrwg/J7G0tgChnMHAWJKKLzlhP1P76etbSTmTW6542 gPQVyWI4p8UidtTHQL/lIow1Nr6ejwqL89r1YPewlfWiGvoyFpMgb0WlQRD3m3qk2vIr YZguLaOMP7QrerM8V/Z+ZZXQOojHwT52GDwU+lIlJjtkh+jM/cCcDa7TiLsXiPOlFHgn 5QFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mjFI+70WcTGWZzOvRYTwjpxoGfJyrvh0N0T6LNNgwOc=; b=FbZTX+IC/RXtWSr147jQj3QOldL08OsWMF72+Z55F5vgjnAYklqpFc8NYEyaoQ9wNZ fff1SsuTthIt7Z0/NlvOGTR2VTSMDn65NS++ZYCeUUEm7kda+ymHCCx9ZveG7pMpK12/ BYOUD1S8wE0i0TV8jYQjwvev1H/0doAKVxTAVd1eqylSR7MYjuy/YsJK2XNpuIaWOM9I /4UVHeN/5nvQ1fJBQ1XaPO1srD/skiSsFoujcDNx48DJ5YBGej56L8oOH1BMbA+HRv5B cAbnHY+FrPTwzdcr8pd1CxdTa6kaKcQmKjXHczUNjrEsyU07nj+ChcStkqLULh5vX2+l +dew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CgpOVq12; 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 e11si15530451pfd.88.2019.04.04.02.26.12; Thu, 04 Apr 2019 02:26:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=CgpOVq12; 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 S2387941AbfDDJYX (ORCPT + 99 others); Thu, 4 Apr 2019 05:24:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:55252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733047AbfDDJOf (ORCPT ); Thu, 4 Apr 2019 05:14:35 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CE7F2147C; Thu, 4 Apr 2019 09:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554369274; bh=47S0Pso0HxbbKdpbq6SywImh7Wj1h6QJUSbOOZBo/Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CgpOVq12bDVJuGQ/IXbSZQRuQ7CaZjN/o9gFbJpMRxjPfIvbObe+368WGsJthZnYu bOe/lgA2PllP5yRpxjpi47vxtXhlmuE0kKoKuFT8RataMY1M6EWmJVziPH6+SCD319 fU68BxSHmYXgik+y5nUWdqfLDJBGL0Eaf3bRbDio= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luc Van Oostenryck , "Peter Zijlstra (Intel)" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 5.0 149/246] sched/topology: Fix percpu data types in struct sd_data & struct s_data Date: Thu, 4 Apr 2019 10:47:29 +0200 Message-Id: <20190404084624.386574660@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084619.236418459@linuxfoundation.org> References: <20190404084619.236418459@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 5.0-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 99687cdbb3f6c8e32bcc7f37496e811f30460e48 ] The percpu members of struct sd_data and s_data are declared as: struct ... ** __percpu member; So their type is: __percpu pointer to pointer to struct ... But looking at how they're used, their type should be: pointer to __percpu pointer to struct ... and they should thus be declared as: struct ... * __percpu *member; So fix the placement of '__percpu' in the definition of these structures. This addresses a bunch of Sparse's warnings like: warning: incorrect type in initializer (different address spaces) expected void const [noderef] *__vpp_verify got struct sched_domain ** Signed-off-by: Luc Van Oostenryck Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190118144936.79158-1-luc.vanoostenryck@gmail.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- include/linux/sched/topology.h | 8 ++++---- kernel/sched/topology.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h index c31d3a47a47c..57c7ed3fe465 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h @@ -176,10 +176,10 @@ typedef int (*sched_domain_flags_f)(void); #define SDTL_OVERLAP 0x01 struct sd_data { - struct sched_domain **__percpu sd; - struct sched_domain_shared **__percpu sds; - struct sched_group **__percpu sg; - struct sched_group_capacity **__percpu sgc; + struct sched_domain *__percpu *sd; + struct sched_domain_shared *__percpu *sds; + struct sched_group *__percpu *sg; + struct sched_group_capacity *__percpu *sgc; }; struct sched_domain_topology_level { diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 3f35ba1d8fde..efca2489d881 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -676,7 +676,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) } struct s_data { - struct sched_domain ** __percpu sd; + struct sched_domain * __percpu *sd; struct root_domain *rd; }; -- 2.19.1