Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1789801imu; Wed, 21 Nov 2018 01:53:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/VQle+rTmk4W6ZwJ23BKCIo0EIxKk3PrvcVj8q4GsuleVl+hrrOkqpsHfKro1RpuGMrf5A4 X-Received: by 2002:a63:588:: with SMTP id 130mr5232887pgf.273.1542794037720; Wed, 21 Nov 2018 01:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542794037; cv=none; d=google.com; s=arc-20160816; b=oqOXJjy83xZ7mkDo4I/yy1fJzh85mXLLsICt3dA3GDFXvKNxqxz2mRxO+8V2ybS9Y5 kXzT2170mfQthTBOpPZXkEFkaHo2u6d+bsuZwH5B9ACFtXDJfuTr3LRWCFi9M1wftgU+ be39HY8PzkXih7SmQANvm0mM2ckJ48xjpZ7xgwGbjywkRT4GVFs43w6M5nf2KWNfZ8dJ kLxa3eamaPdbNihqspPzzCZWtUaIvBDjvTMgQOKGeaK2ZIePyVU97tPwVvVOQMbMClRF CT+Hq5EuSKJWv9IEvc4G4WSr54QHJH95c9HUAr4tIpv90+pMWpOYs4qoSfSGiBnUEV1G 67sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EkFpHvmJTEH1SGepR89qPfyza4Zrj2hXAHc4N1tJVEE=; b=tAgUK+YNs37/NhrRjRHKGIB/vxitZj+hN7mIb0juVWA2xh5z9/cQf7KG0EYrXfqMZF WVAxXk86YC9VszXob1dE2CYkSrFn2klE18h2u5269WpBPBimGrPHjU3Qv6iLTV4A8Ojp xDdlk3Kw9bh/QPtYs9MxqbQmBZkCjQSxKjTcq1qOkvcv+gzkhDEd8y2MFYLLQmFzIOx5 TrwuQTsA7oFwx7EGrHwy1gFxPGjV+t0YvqPxJalIqa8evzoqztZegnhSG/2dBGNygNxj XbgAb9CZ2qt6yR1mEKcQ+ocXxP0cwuBn45/FUWJMQnohuFQiyFvb5SNE2clW7SLtLGYG H/HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dDM3sH59; 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 2si43063575pgy.35.2018.11.21.01.53.42; Wed, 21 Nov 2018 01:53:57 -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=pass header.i=@linaro.org header.s=google header.b=dDM3sH59; 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 S1729107AbeKUT3R (ORCPT + 99 others); Wed, 21 Nov 2018 14:29:17 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45654 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbeKUT3Q (ORCPT ); Wed, 21 Nov 2018 14:29:16 -0500 Received: by mail-wr1-f68.google.com with SMTP id v6so4735836wrr.12 for ; Wed, 21 Nov 2018 00:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EkFpHvmJTEH1SGepR89qPfyza4Zrj2hXAHc4N1tJVEE=; b=dDM3sH59L9ygJvOE3lUVWfLocAn36ewYygEGWouJ3dQJEVH7qehs037X8bHDbUN2Z/ 3TThihWxtsOqiAj+wO55kPLm8QU+gL25Rhyx0NxJLUBIZ+uEMUEfFGUEBrrV60DtRfT6 mlA8IkDrLCOiVBH9o0fZbQcWCkNg2R3fvWkf8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EkFpHvmJTEH1SGepR89qPfyza4Zrj2hXAHc4N1tJVEE=; b=WWRevZkzvmi23uATDUo4kwUIfLoBYbEp5mbTPARPhESorD6qu/WXohtG3eq0SywC1/ 4UeNV0SjtCAGTL4X2sfBDMiV+bIB6iRx6Inv+oak5nuDpBkUuin7cA0i6wqL696PA3Iw e7hW7EzQf9bcLWIlzH/VqQX2PNWzZTaSjmbwd8tbfEVmHmh/ayNj3Squwuq/446bsKdu zegk4yIOdgHtEG7SsaHGstI5v37DIneTEU//cyoC5XPXVETmaQSm4wlrBkRxSRwe040h 7wcCW3eRBMkmRCVPT9F76OXJ1O8WODR47IsPIxfZ7B50aCSjncFnR+/BDzuF/XONgiFA Y3Rw== X-Gm-Message-State: AA+aEWZWSU2u3Cacl1l1QkCFpmaOhWOBykxGEVj3QY0utlxKvTKFzwJw KldTtRaVjDRy9KGF2eJzhYLyT1PFsFM= X-Received: by 2002:adf:fd87:: with SMTP id d7mr4692167wrr.74.1542790536310; Wed, 21 Nov 2018 00:55:36 -0800 (PST) Received: from [192.168.0.40] (239.22.136.77.rev.sfr.net. [77.136.22.239]) by smtp.googlemail.com with ESMTPSA id w8sm10573190wrv.7.2018.11.21.00.55.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 00:55:35 -0800 (PST) Subject: Re: [PATCH v2 1/3] thermal: tegra: continue if sensor register fails To: Wei Ni , thierry.reding@gmail.com, linux-tegra@vger.kernel.org Cc: rui.zhang@intel.com, edubezval@gmail.com, linux-kernel@vger.kernel.org References: <1542103567-5521-1-git-send-email-wni@nvidia.com> <1542103567-5521-2-git-send-email-wni@nvidia.com> From: Daniel Lezcano Message-ID: Date: Wed, 21 Nov 2018 09:55:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1542103567-5521-2-git-send-email-wni@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/11/2018 11:06, Wei Ni wrote: > Don't bail when a sensor fails to register with the > thermal zone and allow other sensors to register. > This allows other sensors to register with thermal > framework even if one sensor fails registration. I'm not sure if ignoring the error is really safe. Can you describe the real situation you want to overcome ? How do you differentiate critical sensors ? > Signed-off-by: Wei Ni > --- > drivers/thermal/tegra/soctherm.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c > index ed28110a3535..a824d2e63af3 100644 > --- a/drivers/thermal/tegra/soctherm.c > +++ b/drivers/thermal/tegra/soctherm.c > @@ -1370,9 +1370,9 @@ static int tegra_soctherm_probe(struct platform_device *pdev) > &tegra_of_thermal_ops); > if (IS_ERR(z)) { > err = PTR_ERR(z); > - dev_err(&pdev->dev, "failed to register sensor: %d\n", > - err); > - goto disable_clocks; > + dev_warn(&pdev->dev, "failed to register sensor %s: %d\n", > + soc->ttgs[i]->name, err); > + continue; > } > > zone->tz = z; > @@ -1434,6 +1434,8 @@ static int __maybe_unused soctherm_resume(struct device *dev) > struct thermal_zone_device *tz; > > tz = tegra->thermctl_tzs[soc->ttgs[i]->id]; > + if (!tz) > + continue; > err = tegra_soctherm_set_hwtrips(dev, soc->ttgs[i], tz); > if (err) { > dev_err(&pdev->dev, > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog