Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1030321yba; Thu, 4 Apr 2019 02:49:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCBwUdx7+M86qF/rxhE3g+dQ/fRZuAQ/ToWWlPO7A/Wy/Izm8haJJ7nVtflRYn9sUZjcuw X-Received: by 2002:a62:1d0d:: with SMTP id d13mr4920581pfd.96.1554371392804; Thu, 04 Apr 2019 02:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554371392; cv=none; d=google.com; s=arc-20160816; b=UVA3JNkz7478gTQoeJAo4Ju6g8RwDWTA0AOhm+iBDi7dIqv65srZHnKdFZ2xpnhOuq BmLseMZS59JS+oVBA/nGlNbb0t7DaQZaq9U96xaVcl48mTxyDYdQbAR4WtUh3uo1AnI8 q42BJ2IlTCkKAWhjy95ymR5pTht07TarPTYJQqj6A6sVyYw4gYiQXBqOM3YydHf6cW9b nL4NAYOpa8tv9ItCqHcUlwm+riB8b4lJi2PztJjsZp7HO0iRm32QGBhNxquaL9Sl68cQ dSuBOhSglDWawpvKrNXAdcgHQIk5KYcW4QTQEpSaO6T45yfxRfb7t3Hcrv3xtV7R1fOG 3K5Q== 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=knWc+TTZ2tSVmMzKWMOE1j/vl0lyJ15olxX2VTIpz1E=; b=tffOqvN85WYT/4uYJrukpu/erYqLAoukn1wW/usxfTE6Nl0GAht7OTrYPS/JbT+Cx8 xoGbE/PriHciWfgp5cFNJvl1QcI7s0odDGCIXNwVT/dTlF03y6xSnNhbsYWE1d/9bAwq 7MuqZT+pHk+XMGlqiNjrZrsGZzJPMqb93Gbre4sM+7l6EYByJJuJcBQixPyVJ30wmPUc 7918az5VN6K5Ikz6/jFAQ+gSSigeeT5jVNiqXMag541EXryPxW8pi3F4qu5Zm5HAinM8 8rraeIFnmCqpyeYZYIgK9IydmFmZR3F0kHJzR5abYPzgw7sN+xWRv5w3Du1iLtGNVkg/ tHsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Ds/q8VUA"; 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 f15si16255573pgm.132.2019.04.04.02.49.37; Thu, 04 Apr 2019 02:49:52 -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="Ds/q8VUA"; 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 S1730552AbfDDI4s (ORCPT + 99 others); Thu, 4 Apr 2019 04:56:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:60264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730537AbfDDI4p (ORCPT ); Thu, 4 Apr 2019 04:56:45 -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 9474C2177E; Thu, 4 Apr 2019 08:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368204; bh=/tCmCysmJi+p1l9eCzbFxPQDPgIRckyhiAZbfMRf6V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ds/q8VUAfsZiIkWND5Jb/1XImw/hTt+lr6Cz8YS61lEyMliQSRXqfcXYI3nUq3/zf Gxbic65m5I8CvcHu84T26FAFuy8aEa9ixjT1nGdRCOFjZfLzMiy8E9nrZ3LP6mIS/0 ENi26xePRt09fI5inpTP0rr+MnnEAp4C4bXyydlM= 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 4.14 075/121] sched/topology: Fix percpu data types in struct sd_data & struct s_data Date: Thu, 4 Apr 2019 10:47:43 +0200 Message-Id: <20190404084549.334573305@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084545.245659903@linuxfoundation.org> References: <20190404084545.245659903@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 4.14-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 cf257c2e728d..5a92baa91e0c 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h @@ -177,10 +177,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 659e075ef70b..9dcd80ed9d4c 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -499,7 +499,7 @@ static int __init isolated_cpu_setup(char *str) __setup("isolcpus=", isolated_cpu_setup); struct s_data { - struct sched_domain ** __percpu sd; + struct sched_domain * __percpu *sd; struct root_domain *rd; }; -- 2.19.1