Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1023178yba; Thu, 4 Apr 2019 02:39:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlJMVZIdbnmJsK0Ykul0lnDG6lsHV3utw9PvC2A0ks9Juh0mvwUbQRPFoY+HclGMo4KxKc X-Received: by 2002:a17:902:704a:: with SMTP id h10mr250482plt.83.1554370749405; Thu, 04 Apr 2019 02:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370749; cv=none; d=google.com; s=arc-20160816; b=hG2SU+YQbCMkQ6Lb5X7A03VzdP6O2MlqvZLD/2dsTrT6Q9U68oROh2D8DqMZxfDels xewidS5YPoysw59nE+c7Lwsa+rxFursRSDPSxgXyIRzHvUWn0SJ+XE1aBRoOyBPbPZFC Y8IQ84t4mSQDmJ/LCz4MK6pLTKQAl4GlDFWxWPUNGg75JnU9P4MGyDYCE7jrxSZ1VoOr dMPPthd/MfVCzFe37F+IQEBrdhF8J74TW0r4jDwAw55O+j65m/QLtKbdWxqgfahWzmMW qyz+3GDxRZt5AUExPgjHdpP87D5IUHaM9x7DOa6HVGOWISjSDXBEOAarB6VZPN+OQGCN mVPA== 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=vT0WKtIWRRrgui9zzrX9M2cVrMFI3OHwLN3vZ8VOUTQ=; b=NBOyXQrGTEhUbFEGQnTZY7J1vtN0diS530nBOsT5bgvt/IpeF0TAtVQxPkMvMwRWDN 3IDhPyPgM2XA8scQoAia3DMeRpYIcz6rO/B29yH9CDDQbMQPxPF8x6YxY0SaCx1gTRcJ r2lZ88drViaKB1jutzjxqJ4U6oCw1VN+kTiPfme6H9Xg+FQEbNXO/K4DbVS0b3O3JPra pCNOnP4T2bAwgYGFEa0fulsj5S0SMX4Mws9lO00VpGZbTa7HiJvnBVQfylkofZnupKnI KWPMdvCv2DgPmnAcSZLLnPsGFUEa0HwISZ4esULp75+77pBNZBHDB6lBmS8PXscwVQG7 Bfbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QGTc6g2m; 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 l11si16060211plb.159.2019.04.04.02.38.53; Thu, 04 Apr 2019 02:39:09 -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=QGTc6g2m; 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 S1731988AbfDDJEc (ORCPT + 99 others); Thu, 4 Apr 2019 05:04:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:42346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731979AbfDDJEa (ORCPT ); Thu, 4 Apr 2019 05:04:30 -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 6D9A32177E; Thu, 4 Apr 2019 09:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368669; bh=9TTgjR2sLZmI/8F5IPP2Li29A4sSUd1kdQZAU9a8P2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QGTc6g2mx4sss4ltIggiBfr13x8pBzHgpLmP7eMBBTsGwb7yD1rqKhKjCYq5eH2yz 8Xta2HTxCbCc9KEtTSih12tT10uEaPjNsPfrwn/m/qmOnXJ4+AqgEMo0PzbQP46Ixq HsoN+SbrbcCUpCBiCtLnLH9WyAw9wR1o1wxRPrPo= 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.19 110/187] sched/topology: Fix percpu data types in struct sd_data & struct s_data Date: Thu, 4 Apr 2019 10:47:27 +0200 Message-Id: <20190404084608.457344973@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@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.19-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 26347741ba50..15f3f61f7e3b 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 505a41c42b96..c0a751464971 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -477,7 +477,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