Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5907540imu; Wed, 30 Jan 2019 05:42:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN5rxX2MSDLU5nkSZfwMCvPcTHO1T0IGsTeka6bqtYTpAK/hUuSV4bOgk4L7FVibr/o4uwTC X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr31179105plb.335.1548855768635; Wed, 30 Jan 2019 05:42:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548855768; cv=none; d=google.com; s=arc-20160816; b=sAebqcfKBdU4/5Zn8mfqYfOYFTZ42z1fg6ryZyhzuTQRBoOx6W0KLbmrcjYl/SWAyP chf8UPxFBBqE0YmZHbsDEEecBz0mzS+FVs2+5ysawgUzyOh09VGBoO2nl7YSTOJcaJzI u90UWjeJMFRER1zuJ5pcDBTXAIRClIHgHC0guHSGfjn+SQigQV8kHuZ91BWeLnft5nsF 4/Y/32yRnc8lXf6hQlOgcPS178WSJKpoOVrk1FDC0MjI6h7jk/2uQ4DM3KHPCADMeWuk UBtK+MFP/gwiZDyU3EjRhwg+/blAKbTox+enJ5z3PVFZaPDff41jAKnk7FaSRUb58eTS wTKA== 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=DYqTEACTkXHg3ZCmEtEmhedaOoYNjgilJ3CmLAn9pF4=; b=CGH6B0B+bvZW4I5hl1gy3OFnqoDQJgLj6NVUBku9uuEUrfvIUvqK0iy0NPxDSC6Mxc L0N8lBJYyoLFMoNCiQi+ed2AMIQSG40oHFJnROI/D6jUqNFqeZH0xRtNt8PzmB3YchFy d2lZCurqXBKYaeffR2LCKO0hkwW6/1cDWNIwe63I2zeY6oys3coW2YuyIFfpxxc+Y6/y KkxPDFDXB4RmaBK8fJOL0TjR1RfCChJz2Qa64j8N3x91FQwj1iXZiMN11nRclbUNRslD l2eA4ALaAMSCTyCB2ctvlu+/QumHb/7etV2K9DYytf5TZYxiAWHeKsNDe8kx+whpGX18 +QTw== 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 i189si1552165pfg.265.2019.01.30.05.42.32; Wed, 30 Jan 2019 05:42:48 -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 S1727740AbfA3NmW (ORCPT + 99 others); Wed, 30 Jan 2019 08:42:22 -0500 Received: from mga04.intel.com ([192.55.52.120]:23257 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfA3NmW (ORCPT ); Wed, 30 Jan 2019 08:42:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 05:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,540,1539673200"; d="scan'208";a="140090226" Received: from wchen25-mobl9.ccr.corp.intel.com ([10.249.173.109]) by fmsmga004.fm.intel.com with ESMTP; 30 Jan 2019 05:42:20 -0800 Message-ID: <1548855738.2161.5.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:42:18 +0800 In-Reply-To: <1548855476.2161.2.camel@intel.com> References: <20190119161523.87999-1-luc.vanoostenryck@gmail.com> <20190130095917.7uxdxrjvtaeydcol@pathway.suse.cz> <1548855476.2161.2.camel@intel.com> 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 21:37 +0800, Zhang Rui wrote: > 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. > well, just with a minor change to get rid of checkpatch warning. ERROR: "foo * bar" should be "foo *bar" #121: FILE: drivers/thermal/intel/intel_powerclamp.c:104: +static struct powerclamp_worker_data __percpu * worker_data; total: 1 errors, 0 warnings, 8 lines checked thanks, rui > thanks, > rui > > > > > Best Regards, > > Petr