Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2434142imj; Mon, 11 Feb 2019 02:50:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IZHe/llk1kZYUjwTjiEP58mxlzsKto6E6xkRuZ+S1MGr6F7+neEPYqqr5Ts+55vKMj8JDAe X-Received: by 2002:a62:345:: with SMTP id 66mr35903823pfd.189.1549882215272; Mon, 11 Feb 2019 02:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549882215; cv=none; d=google.com; s=arc-20160816; b=zAQsgYxO0fEdxxnVXISA3n7XkSwuNp6EP3h1K76TlVpRL2x+/LD52z03cZmim2B9HW jJkNCvdF/PvoJGZ1Dsa6/2UDk2ffH2q2dE+cYZhj93dvAm10qf/LktR4EAkR27XMwAbe ep6Y+25Gd+J68VDgBgSUTy7naBaYPXx3Sq4vP0Q5sxSRZdVC1TQ2BXB/cowOUIt3qI/E 7qBLLgbnb55FfZKfCJb/gH56DJHVYOeBLqz5A6RK4ruz5brelJfextO9ihRHVzfhVOVt FNabFgPvAs2fvmb/eydPi5kv2kRjScq8eW0dfhdXE+tHc2s2823rJvU6kRLS1O4tQEx1 EBnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=Pi8vfn9NvfdUUdjMp714P6BAKhQCU8xp5nw3JFGSnk4=; b=JKYpfpxVYn9oycE3ECLQ8OwEJyTLqOHQ6wkDJxB0BqDDAUIP66Ws1wjZCDUXV6FlqL PlQnIuI1iZqNWulL1sXYta3aS0yhwTItKnDnc/PsUUM1P9m4V8t3KyMFXBPdQlOE7p0m jR3aIVL63HjkCZFBa6MhW6gf4SVLe+t2m3D5LT6J0weUi80WAG6eEfHLMTr/swRcTYT2 G4MkgRP1nuKpq+79wXR3aqBHREDwdUohZNTEAzCg8hzf4q5EGggWx6xyPJgzwx6br35i Haepbu/ZTgT+QrEOjCqk83zAEGVRhqRAp3ZoUcs2Uk4UVpen1s5aVPKKYQHiuMXovJ3A IkEQ== 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 n23si1705400pff.10.2019.02.11.02.49.59; Mon, 11 Feb 2019 02:50:15 -0800 (PST) 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 S1726811AbfBKKtx (ORCPT + 99 others); Mon, 11 Feb 2019 05:49:53 -0500 Received: from terminus.zytor.com ([198.137.202.136]:36229 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbfBKKtw (ORCPT ); Mon, 11 Feb 2019 05:49:52 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x1BAngG13498603 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 11 Feb 2019 02:49:42 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x1BAnfaU3498600; Mon, 11 Feb 2019 02:49:41 -0800 Date: Mon, 11 Feb 2019 02:49:41 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Luc Van Oostenryck Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, luc.vanoostenryck@gmail.com, torvalds@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, mingo@kernel.org Reply-To: hpa@zytor.com, luc.vanoostenryck@gmail.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, mingo@kernel.org, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <20190118144936.79158-1-luc.vanoostenryck@gmail.com> References: <20190118144936.79158-1-luc.vanoostenryck@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/topology: Fix percpu data types in struct sd_data & struct s_data Git-Commit-ID: 99687cdbb3f6c8e32bcc7f37496e811f30460e48 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 99687cdbb3f6c8e32bcc7f37496e811f30460e48 Gitweb: https://git.kernel.org/tip/99687cdbb3f6c8e32bcc7f37496e811f30460e48 Author: Luc Van Oostenryck AuthorDate: Fri, 18 Jan 2019 15:49:36 +0100 Committer: Ingo Molnar CommitDate: Mon, 11 Feb 2019 08:02:15 +0100 sched/topology: Fix percpu data types in struct sd_data & struct s_data 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 --- 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 4ae9403420ed..93ff526e77b0 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -705,7 +705,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; };