Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp464161ybl; Thu, 12 Dec 2019 22:24:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwyjyL/59EuTtSmkkyRItyBeku7YQmlk0qA2DUWkn2DSGj5J9uq6CC/RAffKs4PMubvt7a0 X-Received: by 2002:a9d:784b:: with SMTP id c11mr12118224otm.246.1576218279599; Thu, 12 Dec 2019 22:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576218279; cv=none; d=google.com; s=arc-20160816; b=ExlSdfCbtfAOrVyT837WvVL8+u5ZmrdADAromOsehzlCy28CmqpT/OUtdR3LB/mqNq D2KUghQOPS5E+7jNEKxXnfgNUswvgvN0IVdRY7Fa8S5eSU/66LDcNgSvPCPElOh1YzMh 99rvdP1gCVaMxyGkMDYKfKtHrBa/Wj4mvw3oSIOqdaREuxksqdVjmCAWiJJMEVC873Aw JOAc34q7OWzULQohmB32rTHVqGs3R91LTmuSZBMAIqOemdYLTzO1ujJGU8RQSMLmvdk4 eeImKhhsy4hu28X6EyS4cT8PwQpZep+ppu1OjLwMlihvOQe8gzn94HmyzPG8CaBUs2jF xr/w== 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:dkim-signature; bh=oTcpJNk1xqKGyB5ClAR/s3v8RFY0BEnq+v19yEDpJbk=; b=x6P0bKEbNOXiKT516Aorz693R5EbJSK8OyIu7BnoTOUfTagQ6CllOkPL7Hx9oLXIm2 Kl4EPEzTPtOy7A9snn8N+1HV3PwntFOiTJba/sKtbfszh0oYRXtGwv97KVPfzqnwcdA/ bPNs9mLTEo1P/2/9+AwAM/ZulOJivgIsaf8wnbeQb7liQaiAV1V18nbnWGpaLaGsgMx9 W2RwzvpYKTQmXUQw6O8/2H6H1VNIQRLcVjmC/eLTb2IcgItYGWf67cvEsYqji73wwt7J NWGOyryL8gZlAiUiH0stMwpjzOCTuBOoXHJR9ACJDfuyRu/pyZJ+Ux4zGbpeN+6DTPpA Bi7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GQBWlcsz; 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 h8si4251221otk.183.2019.12.12.22.24.25; Thu, 12 Dec 2019 22:24:39 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GQBWlcsz; 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 S1731981AbfLMGGN (ORCPT + 99 others); Fri, 13 Dec 2019 01:06:13 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35669 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729533AbfLMGGM (ORCPT ); Fri, 13 Dec 2019 01:06:12 -0500 Received: by mail-pl1-f196.google.com with SMTP id s10so799240plp.2; Thu, 12 Dec 2019 22:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oTcpJNk1xqKGyB5ClAR/s3v8RFY0BEnq+v19yEDpJbk=; b=GQBWlcszvv5PGxYVAfrOSXSUt48y7V81ivYARzQtMMY+sz6ilI/paRYxJhfgj0vnZY WRyJw1FeC/qV5UxnlnCFzn4KM2iHW3fBeI+oy+uUlu7wvrGdVp8iL+eXn7HNPGLDnkrr Nsj4WMdGcqA4Ko0fBaVM9J4xMAMMdKKJhDMzDmhZdmNMxfhepWq7285obv6Ub5hsgKfh WX/dKSrPzVzvjmAe03kzo7JaR6NXW1C9kb85DHy43zw1bmtkMCc+KAxnSW/Ktt56SFmk cRNKYUZBd4vWLgGBAAY2oy4jDyPbZtAmJQzuzoOmu9Y3NyCSNu6tTJjGwzL8uy8fWJld /rpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=oTcpJNk1xqKGyB5ClAR/s3v8RFY0BEnq+v19yEDpJbk=; b=ZNm4SCxPaBdETWR9GSBbUh3mrrJg1pgV9i4gbK9VNZiWvix3ipALMeRGOQv9HSqJ9k w5gF+qQABUB2hOE9dvaC/FztuKe+oTlaeqH+lvYGmjmNERAH09Y9LUxOebAigaF2BLUh 9d3yWLkxk+JxBKhj7DHtfREX6T8rRPSzKhOx/Y50268ViLHiqF+pwgJzFPpAs34MNELv b7oN4cINN+CC4DUzeCYfcz6hvLGa05NUZjowz6/HxX2uhE8ipZN23rPGxTURmr7LZ4Qk GFRWoTWtpxNkcYzTkJdPPvmS4Jk6twV+6UEJSLcFrm5R/geygmUGM/u+OrJW43VBM6P6 ptug== X-Gm-Message-State: APjAAAW+mpXvH6vy0nc8qAx8I3bgN5i+Og+I9XMoo36f/KP5160DZNgu 8TlRw8QOmgX/b3f6SctFLGs= X-Received: by 2002:a17:90a:bc05:: with SMTP id w5mr14491704pjr.64.1576217172025; Thu, 12 Dec 2019 22:06:12 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p16sm8964659pgi.50.2019.12.12.22.06.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Dec 2019 22:06:11 -0800 (PST) Date: Thu, 12 Dec 2019 22:06:09 -0800 From: Guenter Roeck To: Chen Zhou Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [-next] hwmon: (w83627ehf) make sensor_dev_attr_##_name variables static Message-ID: <20191213060609.GA20673@roeck-us.net> References: <20191213015605.172472-1-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191213015605.172472-1-chenzhou10@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 13, 2019 at 09:56:05AM +0800, Chen Zhou wrote: > Fix sparse warning: > > drivers/hwmon/w83627ehf.c:1202:1: warning: symbol 'sensor_dev_attr_pwm1_target' was not declared. Should it be static? ... > > Reported-by: Hulk Robot > Signed-off-by: Chen Zhou Applied (though I removed most of the log messages - there no point of having all of them in the commit message). Guenter > --- > drivers/hwmon/w83627ehf.c | 56 +++++++++++++++++++++++------------------------ > 1 file changed, 28 insertions(+), 28 deletions(-) > > diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c > index 207cc74..0a13f6b 100644 > --- a/drivers/hwmon/w83627ehf.c > +++ b/drivers/hwmon/w83627ehf.c > @@ -1199,22 +1199,22 @@ store_tolerance(struct device *dev, struct device_attribute *attr, > return count; > } > > -SENSOR_DEVICE_ATTR(pwm1_target, 0644, show_target_temp, > +static SENSOR_DEVICE_ATTR(pwm1_target, 0644, show_target_temp, > store_target_temp, 0); > -SENSOR_DEVICE_ATTR(pwm2_target, 0644, show_target_temp, > +static SENSOR_DEVICE_ATTR(pwm2_target, 0644, show_target_temp, > store_target_temp, 1); > -SENSOR_DEVICE_ATTR(pwm3_target, 0644, show_target_temp, > +static SENSOR_DEVICE_ATTR(pwm3_target, 0644, show_target_temp, > store_target_temp, 2); > -SENSOR_DEVICE_ATTR(pwm4_target, 0644, show_target_temp, > +static SENSOR_DEVICE_ATTR(pwm4_target, 0644, show_target_temp, > store_target_temp, 3); > > -SENSOR_DEVICE_ATTR(pwm1_tolerance, 0644, show_tolerance, > +static SENSOR_DEVICE_ATTR(pwm1_tolerance, 0644, show_tolerance, > store_tolerance, 0); > -SENSOR_DEVICE_ATTR(pwm2_tolerance, 0644, show_tolerance, > +static SENSOR_DEVICE_ATTR(pwm2_tolerance, 0644, show_tolerance, > store_tolerance, 1); > -SENSOR_DEVICE_ATTR(pwm3_tolerance, 0644, show_tolerance, > +static SENSOR_DEVICE_ATTR(pwm3_tolerance, 0644, show_tolerance, > store_tolerance, 2); > -SENSOR_DEVICE_ATTR(pwm4_tolerance, 0644, show_tolerance, > +static SENSOR_DEVICE_ATTR(pwm4_tolerance, 0644, show_tolerance, > store_tolerance, 3); > > /* Smart Fan registers */ > @@ -1291,35 +1291,35 @@ store_##reg(struct device *dev, struct device_attribute *attr, \ > > fan_time_functions(fan_stop_time, FAN_STOP_TIME) > > -SENSOR_DEVICE_ATTR(pwm4_stop_time, 0644, show_fan_stop_time, > +static SENSOR_DEVICE_ATTR(pwm4_stop_time, 0644, show_fan_stop_time, > store_fan_stop_time, 3); > -SENSOR_DEVICE_ATTR(pwm4_start_output, 0644, show_fan_start_output, > +static SENSOR_DEVICE_ATTR(pwm4_start_output, 0644, show_fan_start_output, > store_fan_start_output, 3); > -SENSOR_DEVICE_ATTR(pwm4_stop_output, 0644, show_fan_stop_output, > +static SENSOR_DEVICE_ATTR(pwm4_stop_output, 0644, show_fan_stop_output, > store_fan_stop_output, 3); > -SENSOR_DEVICE_ATTR(pwm4_max_output, 0644, show_fan_max_output, > +static SENSOR_DEVICE_ATTR(pwm4_max_output, 0644, show_fan_max_output, > store_fan_max_output, 3); > -SENSOR_DEVICE_ATTR(pwm4_step_output, 0644, show_fan_step_output, > +static SENSOR_DEVICE_ATTR(pwm4_step_output, 0644, show_fan_step_output, > store_fan_step_output, 3); > > -SENSOR_DEVICE_ATTR(pwm3_stop_time, 0644, show_fan_stop_time, > +static SENSOR_DEVICE_ATTR(pwm3_stop_time, 0644, show_fan_stop_time, > store_fan_stop_time, 2); > -SENSOR_DEVICE_ATTR(pwm3_start_output, 0644, show_fan_start_output, > +static SENSOR_DEVICE_ATTR(pwm3_start_output, 0644, show_fan_start_output, > store_fan_start_output, 2); > -SENSOR_DEVICE_ATTR(pwm3_stop_output, 0644, show_fan_stop_output, > +static SENSOR_DEVICE_ATTR(pwm3_stop_output, 0644, show_fan_stop_output, > store_fan_stop_output, 2); > > -SENSOR_DEVICE_ATTR(pwm1_stop_time, 0644, show_fan_stop_time, > +static SENSOR_DEVICE_ATTR(pwm1_stop_time, 0644, show_fan_stop_time, > store_fan_stop_time, 0); > -SENSOR_DEVICE_ATTR(pwm2_stop_time, 0644, show_fan_stop_time, > +static SENSOR_DEVICE_ATTR(pwm2_stop_time, 0644, show_fan_stop_time, > store_fan_stop_time, 1); > -SENSOR_DEVICE_ATTR(pwm1_start_output, 0644, show_fan_start_output, > +static SENSOR_DEVICE_ATTR(pwm1_start_output, 0644, show_fan_start_output, > store_fan_start_output, 0); > -SENSOR_DEVICE_ATTR(pwm2_start_output, 0644, show_fan_start_output, > +static SENSOR_DEVICE_ATTR(pwm2_start_output, 0644, show_fan_start_output, > store_fan_start_output, 1); > -SENSOR_DEVICE_ATTR(pwm1_stop_output, 0644, show_fan_stop_output, > +static SENSOR_DEVICE_ATTR(pwm1_stop_output, 0644, show_fan_stop_output, > store_fan_stop_output, 0); > -SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output, > +static SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output, > store_fan_stop_output, 1); > > > @@ -1327,17 +1327,17 @@ SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output, > * pwm1 and pwm3 don't support max and step settings on all chips. > * Need to check support while generating/removing attribute files. > */ > -SENSOR_DEVICE_ATTR(pwm1_max_output, 0644, show_fan_max_output, > +static SENSOR_DEVICE_ATTR(pwm1_max_output, 0644, show_fan_max_output, > store_fan_max_output, 0); > -SENSOR_DEVICE_ATTR(pwm1_step_output, 0644, show_fan_step_output, > +static SENSOR_DEVICE_ATTR(pwm1_step_output, 0644, show_fan_step_output, > store_fan_step_output, 0); > -SENSOR_DEVICE_ATTR(pwm2_max_output, 0644, show_fan_max_output, > +static SENSOR_DEVICE_ATTR(pwm2_max_output, 0644, show_fan_max_output, > store_fan_max_output, 1); > -SENSOR_DEVICE_ATTR(pwm2_step_output, 0644, show_fan_step_output, > +static SENSOR_DEVICE_ATTR(pwm2_step_output, 0644, show_fan_step_output, > store_fan_step_output, 1); > -SENSOR_DEVICE_ATTR(pwm3_max_output, 0644, show_fan_max_output, > +static SENSOR_DEVICE_ATTR(pwm3_max_output, 0644, show_fan_max_output, > store_fan_max_output, 2); > -SENSOR_DEVICE_ATTR(pwm3_step_output, 0644, show_fan_step_output, > +static SENSOR_DEVICE_ATTR(pwm3_step_output, 0644, show_fan_step_output, > store_fan_step_output, 2); > > static ssize_t