Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5699435imu; Wed, 30 Jan 2019 02:01:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ISxfnpNrCnbJZaMJUbKqCZdkUIHX5XafRvAaz3EFFWlxlZ55aINoC5XupHxRV92FQ3BOx X-Received: by 2002:a63:de46:: with SMTP id y6mr26894006pgi.198.1548842465224; Wed, 30 Jan 2019 02:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548842465; cv=none; d=google.com; s=arc-20160816; b=s0w9h4zlbYwjdl9uLBjU2alArtZYw5idnb5rzt+PhMo5b++mcBNhFSf5LmveeLUKK9 lI8v8esfpv09pYrvkdku83u/rYUX/gu2Puze3cd8dejwGmb951ggz/d4Zm6eMuHYB+r2 JQGkMARfFg5Yx+Hwkcj3dfvMTxCb8nMPbEE2PH1d8oZ3MHsbp5Yxn4l8uC1ebaJ4vXv0 SKvy3wk5ttzADitqFajgfYi+fy2XF4JE0lAOK2d63YLI1xjNH2ojWW6UNJkNjzxhMB9n V/vANSrj1uk5vllLIBUqzLO41XxcQrB6uY6YoQGZA2a6SQid1XV65Z8wOn1WBxrxszoB yINA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=h/LzO0R36oWmzo1htEyFdE0Llh8dU2wFSbhi4GhnwDk=; b=H7427+MzWHmZFsyY4TKg436fWQLT+ViS6D/W6yVtNrrM+qOdv/fghQzekHYqNtAyW3 0vviQ/uHUfj9EnIZM2AIofA1Q0BRHrCGo0S+kqPHrZi22ws26eCC83VUBLlnu7+dPhDP Csb+7q20YLIHj2Lbauk5U0OdSM8Y+lSRvRmXkZfYERwGlLNyW8sW/L2BK/sSLJgV0aZc k19GZ84GhD4Zg973QTqmUB4z2DaVVv+vu4twa5S04GelewSNjp+1gi2jNaQU8BmM/k+L Ew2xxXg+WS+bIThycvVz1qWGIlJmMPHAHXE7dRgemvETxFiEwvEoXenpszev9o2RBgEc ggqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si1036064pga.87.2019.01.30.02.00.49; Wed, 30 Jan 2019 02:01:05 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730592AbfA3J7V (ORCPT + 99 others); Wed, 30 Jan 2019 04:59:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:48148 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730527AbfA3J7T (ORCPT ); Wed, 30 Jan 2019 04:59:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2A919AD76; Wed, 30 Jan 2019 09:59:18 +0000 (UTC) Date: Wed, 30 Jan 2019 10:59:17 +0100 From: Petr Mladek To: Luc Van Oostenryck Cc: Zhang Rui , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] thermal/intel_powerclamp: fix __percpu declaration of worker_data Message-ID: <20190130095917.7uxdxrjvtaeydcol@pathway.suse.cz> References: <20190119161523.87999-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190119161523.87999-1-luc.vanoostenryck@gmail.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Best Regards, Petr