From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Date: Thu, 29 Oct 2015 04:59:31 +0000 Subject: Re: [lm-sensors] [PATCH v2] hwmon: (scpi) skip unsupported sensors properly Message-Id: <20151029045931.GA17127@roeck-us.net> List-Id: References: <1446041283-19702-1-git-send-email-sudeep.holla@arm.com> <1446052651-9024-1-git-send-email-sudeep.holla@arm.com> In-Reply-To: <1446052651-9024-1-git-send-email-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, Punit Agrawal , lm-sensors@lm-sensors.org, Jean Delvare On Wed, Oct 28, 2015 at 05:17:31PM +0000, Sudeep Holla wrote: > Currently it's assumed that firmware exports only the class of sensors > supported by the driver. However with newer firmware or SCPI protocol > revision, support for newer classes of sensors can be present. > > The driver fails to probe with the following warning if an unsupported > class of sensor is encountered in the firmware. > > sysfs: cannot create duplicate filename > '/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/' > ------------[ cut here ]------------ > WARNING: at fs/sysfs/dir.c:31 > Modules linked in: > > CPU: 0 PID: 6 Comm: kworker/u12:0 Not tainted 4.3.0-rc7 #137 > Hardware name: ARM Juno development board (r0) (DT) > Workqueue: deferwq deferred_probe_work_func > PC is at sysfs_warn_dup+0x54/0x78 > LR is at sysfs_warn_dup+0x54/0x78 > > This patch fixes the above issue by skipping through the unsupported > class of SCPI sensors. > > Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors") > Fixes: ea98b29a05e9 ("hwmon: Support sensors exported via ARM SCP interface") > Cc: Guenter Roeck > Reviewed-by: Punit Agrawal > Signed-off-by: Sudeep Holla Acked-by: Guenter Roeck > --- > drivers/hwmon/scpi-hwmon.c | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > > Hi Guenter, > > Either me/Punit will need ping you once the original driver is merged > via arm-soc so that you can pick this after that. Alternatively we > can push it via arm-soc but I wouldn't rush for that as it's not that > urgent. Is that fine with you ? > Either way is fine with me. Guenter _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756698AbbJ2E7e (ORCPT ); Thu, 29 Oct 2015 00:59:34 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:46895 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756681AbbJ2E7d (ORCPT ); Thu, 29 Oct 2015 00:59:33 -0400 Date: Wed, 28 Oct 2015 21:59:31 -0700 From: Guenter Roeck To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, Punit Agrawal , lm-sensors@lm-sensors.org, Jean Delvare Subject: Re: [PATCH v2] hwmon: (scpi) skip unsupported sensors properly Message-ID: <20151029045931.GA17127@roeck-us.net> References: <1446041283-19702-1-git-send-email-sudeep.holla@arm.com> <1446052651-9024-1-git-send-email-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446052651-9024-1-git-send-email-sudeep.holla@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2015 at 05:17:31PM +0000, Sudeep Holla wrote: > Currently it's assumed that firmware exports only the class of sensors > supported by the driver. However with newer firmware or SCPI protocol > revision, support for newer classes of sensors can be present. > > The driver fails to probe with the following warning if an unsupported > class of sensor is encountered in the firmware. > > sysfs: cannot create duplicate filename > '/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/' > ------------[ cut here ]------------ > WARNING: at fs/sysfs/dir.c:31 > Modules linked in: > > CPU: 0 PID: 6 Comm: kworker/u12:0 Not tainted 4.3.0-rc7 #137 > Hardware name: ARM Juno development board (r0) (DT) > Workqueue: deferwq deferred_probe_work_func > PC is at sysfs_warn_dup+0x54/0x78 > LR is at sysfs_warn_dup+0x54/0x78 > > This patch fixes the above issue by skipping through the unsupported > class of SCPI sensors. > > Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors") > Fixes: ea98b29a05e9 ("hwmon: Support sensors exported via ARM SCP interface") > Cc: Guenter Roeck > Reviewed-by: Punit Agrawal > Signed-off-by: Sudeep Holla Acked-by: Guenter Roeck > --- > drivers/hwmon/scpi-hwmon.c | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > > Hi Guenter, > > Either me/Punit will need ping you once the original driver is merged > via arm-soc so that you can pick this after that. Alternatively we > can push it via arm-soc but I wouldn't rush for that as it's not that > urgent. Is that fine with you ? > Either way is fine with me. Guenter