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: 9830633 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 174A9604D9 for ; Fri, 7 Jul 2017 15:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07BAB2867C for ; Fri, 7 Jul 2017 15:05:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0294286B9; Fri, 7 Jul 2017 15:05:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F94E286A9 for ; Fri, 7 Jul 2017 15:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbdGGPFa (ORCPT ); Fri, 7 Jul 2017 11:05:30 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:36423 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbdGGPF3 (ORCPT ); Fri, 7 Jul 2017 11:05:29 -0400 Received: by mail-wr0-f182.google.com with SMTP id c11so50818129wrc.3 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=VF84HKaBpBBL4nruJFz54UiN4MtloYBwZ10s2HTr4kWKMx0pEm+v/SL823stwAfDZN qCs49lAD5Ruen7hhOi7NgodQziXcM/0aCbkVK1sOqvgtNz9x1PzAD5HFHO/TEFSsDFCK b6/mw1Qneid1Uxmz5kGJnHygt2D5aStTEOPxLHMCWgfb8wLT8mxnkRCQQvyOgLINgheV TNRjp/yzzmNg3qh99kj6bpDl17FoHWRCytUD+slu0W9NWGtrktk5K355I28BN7CSod9O UTVR3a6Od00YVJTadabkGEQDrI/b+TCu5SdRaXgazIT28iOmT8rE7GF0gaoXOVRXlIlc 3kQA== X-Gm-Message-State: AIVw1122SIJ0cUGv78mqAYWQ1HQUsH58bBsdh5IMOlDKAgE3HYW/BTFN vGjGMCcYJishbIgV 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;