Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5904838imu; Wed, 30 Jan 2019 05:39:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN7VCv3pYA1qSUCrTVd/0eEVpLfYyp7s2za84A6drN93gBp8VQ1eT8EWKNGtzwIhQjc1zPq9 X-Received: by 2002:a65:6542:: with SMTP id a2mr27308945pgw.389.1548855591405; Wed, 30 Jan 2019 05:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548855591; cv=none; d=google.com; s=arc-20160816; b=wL72X3TEoxe22SaytOmsO4wD5v7uQF7T78t+d0a6PPlxVcwuLPIIbgw0cBYLgR9CP9 9FQGPTMrOpUtvNoJh2/sVC7/8QhmVCZbXGvrjvUkdaDoTTi4XC4PIr2yvNthvdRQvXv7 fx5yE/Kf2tDKITmzp6oa1lwccFHmqYW6rnMcy7lkl5fbq6+H9bNp7J8wyT/91feK/2N6 h+g7LJbz5kfdS5Ll6GkkjCT5Fsp2ep74h2QRpZ0kyKURfJsplmrJg4Dtj32V54lmj4V4 zMP0hq75WKSkn9wU9EGJNfTpZ9fj9RfABCgsA3WmVIMx5rcFkyG5ZPschyR2nIIQLqm6 N/MA== 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:date:cc:to:from:subject:message-id; bh=ueg6cwVITXH5fOu+QK8qJfm9u7L102Vhh7r5fVRrnn8=; b=yVfjkv9PBVrHUQQgGKVxT9UA5BWRUhpnun+fwknBaCLlQavq3cNV8JL9V5LR0caMWZ UprORAnOh8uZnLSbOr7FVXdunVxajMFWkkPrq2ORgQQntQowdfJTzn/wbxAOqeyum+jX K8qW1H3hGtjluPnUZfvFsCMziZSvXwRJbO5FW1eGxVF17V/5UeDDN4tq3IYTmtrF0k0F G/QZG5DKiMYBY7RM3aggbwv2YDAbqMNRPeihxwqnU6NY7QPr9xAuB7FblboJrWTx0AQY SClYNZBxFUfxY5OxQ4ueY2+7zwdRkU0wzU5ejf3IzvPTmR0pEVMAWU1/PVRiQNYSS+4d ts8g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i90si1604844pli.135.2019.01.30.05.39.35; Wed, 30 Jan 2019 05:39:51 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbfA3NiA (ORCPT + 99 others); Wed, 30 Jan 2019 08:38:00 -0500 Received: from mga09.intel.com ([134.134.136.24]:61845 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbfA3Nh7 (ORCPT ); Wed, 30 Jan 2019 08:37:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 05:37:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,540,1539673200"; d="scan'208";a="112319069" Received: from wchen25-mobl9.ccr.corp.intel.com ([10.249.173.109]) by orsmga006.jf.intel.com with ESMTP; 30 Jan 2019 05:37:57 -0800 Message-ID: <1548855476.2161.2.camel@intel.com> Subject: Re: [PATCH] thermal/intel_powerclamp: fix __percpu declaration of worker_data From: Zhang Rui To: Petr Mladek , Luc Van Oostenryck Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 30 Jan 2019 21:37:56 +0800 In-Reply-To: <20190130095917.7uxdxrjvtaeydcol@pathway.suse.cz> References: <20190119161523.87999-1-luc.vanoostenryck@gmail.com> <20190130095917.7uxdxrjvtaeydcol@pathway.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 三, 2019-01-30 at 10:59 +0100, Petr Mladek wrote: > On Sat 2019-01-19 17:15:23, Luc Van Oostenryck wrote: > > > > This variable is declared as: > > static struct powerclamp_worker_data * __percpu worker_data; > > In other words, a percpu pointer to struct ... > > > > But this variable not used like so but as a pointer to a percpu > > struct powerclamp_worker_data. > > > > So fix the declaration as: > > static struct powerclamp_worker_data __percpu *worker_data; > > > > This also quiets Sparse's warnings from __verify_pcpu_ptr(), like: > >   494:49: warning: incorrect type in initializer (different address > > spaces) > >   494:49:    expected void const [noderef] *__vpp_verify > >   494:49:    got struct powerclamp_worker_data * > > > > Signed-off-by: Luc Van Oostenryck > > --- > >  drivers/thermal/intel/intel_powerclamp.c | 2 +- > >  1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/thermal/intel/intel_powerclamp.c > > b/drivers/thermal/intel/intel_powerclamp.c > > index 7571f7c2e..c7cba20bd 100644 > > --- a/drivers/thermal/intel/intel_powerclamp.c > > +++ b/drivers/thermal/intel/intel_powerclamp.c > > @@ -101,7 +101,7 @@ struct powerclamp_worker_data { > >   bool clamping; > >  }; > >   > > -static struct powerclamp_worker_data * __percpu worker_data; > > +static struct powerclamp_worker_data __percpu * worker_data; > Makes perfect sense. I wonder why I wrote it in the wrong order. > > Reviewed-by: Petr Mladek > applied and queued for next -rc. thanks, rui > Best Regards, > Petr