From patchwork Fri Jul 7 15:03:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 107211 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp171673qge; Fri, 7 Jul 2017 08:05:49 -0700 (PDT) X-Received: by 10.84.218.134 with SMTP id r6mr3482488pli.49.1499439949452; Fri, 07 Jul 2017 08:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499439949; cv=none; d=google.com; s=arc-20160816; b=mkTP/5XpcTQxDiSmyOapTvwLDTnlI+oKusy7UzZY96bpU2ajjM0NCD+E97dxCPnWlG XNkOZpz9OUUthpaS4Z1a/7MjjQ3mcwalyR9sRAQkrwQ1Ne6UOD14TV+MbK8P7lNZtpOZ 8uieFlZwGSkjetFrAZ2jfU8vjRWl8DyPNlXxn4gZUhbAq1O/JyoW98Igm6LfEvpzwGkc omtUzh6loviq682AqcsRzWP568RFM52TzWkUmcgTQVz5sLgiXXO0KKx/slZrK8MBSAta 0OBCLXdV2m+KJ3wFdC4Oph96Cg2g3G8uAmMB6bN5a0xiXJOKsRzIfMmvgcjOMzFm6JJO HbXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=onPQMLbPcEaVtt1kOlwkk7TGpInUed4RwQqhyr8izMk=; b=ENmGBoCRKWAnoX1FnsI8bD76ftsYxJMgqY5WsCZVx0hIm65BpUPcjvY/AvnidRyHQB aMDsTxN9xbzFDGQ8kOlLyyIcFOFW/CekhPuLcX8BbHstcS4mQKfQ+tm+CO0fmzGaqs3r RGnc856KFZDQ+Yjj7KpEcaG8Z4istK3J9f849xLCDzqXwGW900TcDoXu13fWmQz7698t cKwwCm4v3De4AsxgHjtHXQAVTR9BpmkD0Sg5bkQ5qnu1moUzBJ2OVPaOCpsoLriX6ehV x/OUUfG+SIeGC+erNv1v9mtAWcHzFHPsLBaE+cUm1StOBlNI9OWlkARqc4FGJPuDlohv O4RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=GtlxER7F; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si2738161pli.569.2017.07.07.08.05.48; Fri, 07 Jul 2017 08:05:49 -0700 (PDT) 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=pass header.i=@linaro.org header.b=GtlxER7F; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbdGGPFb (ORCPT + 25 others); Fri, 7 Jul 2017 11:05:31 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:34784 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbdGGPF3 (ORCPT ); Fri, 7 Jul 2017 11:05:29 -0400 Received: by mail-wr0-f174.google.com with SMTP id 77so50811060wrb.1 for ; Fri, 07 Jul 2017 08:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=onPQMLbPcEaVtt1kOlwkk7TGpInUed4RwQqhyr8izMk=; b=GtlxER7FzSqL0zfxkfiMQpD3MPPUD2Fj+leapTGpaIh70WVhfH9Xj1M0akPDM+6b7W Vwi+2l22dU6ZK4pzE8+lwkkvJ7eZdbhGYCTwS1j9e7GdVv+CSGu3Q1zJQrFVr3Tzf8W3 3gi7xid6Z1oGh3Pq/m9RDQoK31QyL29aCknlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=onPQMLbPcEaVtt1kOlwkk7TGpInUed4RwQqhyr8izMk=; b=uLp/p+p+VM42Ee1KR5y/nkdRBc82lyYg84+rF9BZeiWapKdgIfZdrBNZk28PiWJZAi mA8F/29YYo+AzkUlpQ4gy0+GMCDWQi6qoUiIPmoA77WVAdgL0payE+NZzg2TAK2a3zFJ UyOz8qk0IGCs43P7vWu/hlH1D3VQqGTB4VMpM6OL20M1EI623/o2VSsAjAin/dRzjmp7 Jk2PR9ZavQT6/sxZg2a6U/uAXohyceH+GE7Ts6xOgJE9AOiTBeOK+eSZf2pVd/JOxT4a ZMBCNsewW/ySYziFsx19DIRKzMfuxf+boboVlucI9/Z/IjO0Vr9iZG/TFZpyQQxhGWEB GFtw== X-Gm-Message-State: AIVw1106r2BWCZBhLJGARc76tqx5EvYvbIfaNklqVGLxkt4GouZ/LunC i/kZ1coxU4h3mL5v X-Received: by 10.28.143.208 with SMTP id r199mr2648373wmd.86.1499439928322; Fri, 07 Jul 2017 08:05:28 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:f4e6:cb3:6745:429c]) by smtp.gmail.com with ESMTPSA id n71sm3202710wrb.62.2017.07.07.08.05.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Jul 2017 08:05:27 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] thermal/drivers/hisi: Remove confusing error message Date: Fri, 7 Jul 2017 17:03:52 +0200 Message-Id: <1499439833-32531-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sensor id is unknown at init time and we use all id in the authorized MAX_SENSORS interval to register the sensor. On this SoC there is one thermal-zone with one sensor on it. No need to spit on the console everytime we failed to register thermal sensors, information which is deliberaly known as it is part of the discovery process. hisi_thermal f7030700.tsensor: failed to register sensor id 0: -19 hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19 hisi_thermal f7030700.tsensor: failed to register sensor id 1: -19 hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19 hisi_thermal f7030700.tsensor: failed to register sensor id 3: -19 hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19 Remove the error messages. Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index f642966..2cc98c6 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -187,6 +187,9 @@ static int hisi_thermal_get_temp(void *_sensor, int *temp) dev_dbg(&data->pdev->dev, "id=%d, irq=%d, temp=%d, thres=%d\n", sensor->id, data->irq_enabled, *temp, sensor->thres_temp); + + printk("id=%d, irq=%d, temp=%d, thres=%d\n", + sensor->id, data->irq_enabled, *temp, sensor->thres_temp); /* * Bind irq to sensor for two cases: * Reenable alarm IRQ if temperature below threshold; @@ -260,8 +263,6 @@ static int hisi_thermal_register_sensor(struct platform_device *pdev, if (IS_ERR(sensor->tzd)) { ret = PTR_ERR(sensor->tzd); sensor->tzd = NULL; - dev_err(&pdev->dev, "failed to register sensor id %d: %d\n", - sensor->id, ret); return ret; } @@ -352,10 +353,9 @@ static int hisi_thermal_probe(struct platform_device *pdev) ret = hisi_thermal_register_sensor(pdev, data, &data->sensors[i], i); if (ret) - dev_err(&pdev->dev, - "failed to register thermal sensor: %d\n", ret); - else - hisi_thermal_toggle_sensor(&data->sensors[i], true); + continue; + + hisi_thermal_toggle_sensor(&data->sensors[i], true); } return 0;