Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5583714img; Wed, 27 Mar 2019 11:08:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwa/dcKjLww8MANnXrD43PJkLXBpLD9HAe9Jrd7/zP7ZbBtaH1ugS22/mH4Th00A3U/wfd4 X-Received: by 2002:a63:4e64:: with SMTP id o36mr34701727pgl.213.1553710116765; Wed, 27 Mar 2019 11:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710116; cv=none; d=google.com; s=arc-20160816; b=v+FxU9MlbO9iZnWFCGSeQqRMBTF6ZRPkIL7wsRG0GsfywmQUoS34TNo9BhLpQEPF+w zw/GaDwsfzI322+qCyQK8unIPzMzGu0SCpSO+CoRUouT6USVTOFskUpxHSGvOtSUKs3I IGmz4N7/JgQ3oWcI96Vwu9GDG9cu9RxK6Ho4Gj8GXp8Qlt/zCXb096RCfzRrJQMQCDA3 VR/57LiaD9km7RS3EljJ4fGV7amh+/w6HwDrpe0SmOuhYIaY7tL1ZdDjNSMvCaFhLaQW D8hW3Sz/wHviRtp+e+LWB2YD9TwoJgZXcQgeZGfgcbMUbb+eSzSkcpQQENe39gzy4ZE2 jwpA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vXWNPU3/EgIY3DYEOMOCFNi4PMojgJeEwvd1jsqRbQo=; b=VIci4x70xx0j5MgHnVFaijtItK4sxZeE792+LoDT9FuNkrFIDCUGLIi0Gku0kPnJ41 xvomr3gTJL7QVD8hkYMb9lsYoW5CHTNnnDRP3AbtbYZ/RP32RMWWYtTZczXfO1xqCuN5 CRptMpP4ULw75bDVpNgCNkZ8tefKixJ/B8O/PcV6SRAtfHAzh0XXf+uegqZoB7U5OtS5 GlehcAIXCjiIeJHXOKZwSVUMnoElzj2D8NioxDpqai76AOT9k44d4c1LXpCOFUJ+09SV x328NTXwE1BHlhYDuf2r55ImDiJyZcDCBT8i8dzMQHnBx3lisqX+ZlsAZDsEeb8QKlXX +0mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mdtp5YJX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si19009900pgc.220.2019.03.27.11.08.21; Wed, 27 Mar 2019 11:08:36 -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=mdtp5YJX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388088AbfC0SHG (ORCPT + 99 others); Wed, 27 Mar 2019 14:07:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387532AbfC0SHC (ORCPT ); Wed, 27 Mar 2019 14:07:02 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3409F217F9; Wed, 27 Mar 2019 18:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710022; bh=EJRaAlaxoQ5w5EprQQHjB8rBX/vEQj03XJIgeZe3zJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mdtp5YJXLT5lwwb5OE0ZdM5d2jdCHetB0s1klHb5AhFgH8y2qYDr+I/gTwTqX9e0l gvl4iGPJ5biH7aN7U0fqhBJePKix9t625+3+mvxMkFtibQUEhk/NtMubIbP310Jerm snnEEIjEHjc7e2JF4wYgeREjab7RzJNse3rS4fLs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Luc Van Oostenryck , Peter Zijlstra , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 5.0 159/262] sched/topology: Fix percpu data types in struct sd_data & struct s_data Date: Wed, 27 Mar 2019 14:00:14 -0400 Message-Id: <20190327180158.10245-159-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luc Van Oostenryck [ 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