Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2622842rwi; Fri, 28 Oct 2022 09:10:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Pq8VO5kQ+M9Vrf75QwC2TPA9CvuPHYSy26SEcwdN6h/ZZAG6zbrTxSxSQWyYfYuNwHUaP X-Received: by 2002:a17:903:2cf:b0:186:61b8:84d3 with SMTP id s15-20020a17090302cf00b0018661b884d3mr112959plk.34.1666973409164; Fri, 28 Oct 2022 09:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666973409; cv=none; d=google.com; s=arc-20160816; b=FAY5incgsVdjsmIQpsm0H+R+gqXel7o5GZxabN38EaJEEF1ZZwZzfdzNQNMgtt+Zv+ sXcflG8YRHZiDM6PZKKDGApPpjPNEX3TCraBnyBV1iPsO6cCO0hK6mlRZhQ+gV0lU9AX NjWtAMdgy7QYu4boSpkp/j/KhMRGNSFk6wIiaU9vJsEgfR8Rofu1jSc24nlaUkXTbaMd 2XsI8+a58CQHgg56nST45lid4eWXF0FYC623AimctN9WQ/vXXm+AxaQ4/yRs6S3/PBQ1 KRCsmtiIaVrJmoFSvPY8uSb+nqWdUpixW53sZVFgP9EJS22CeN3oNYnVuzmsGK+0REtF PLzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=kGV5CRuXO/AflfNqwOyb3q124XfnO4+Le7SUJ2VJU3I=; b=Ng2mnk+BHkdiXIyrQNFrr6BjK5upXmW59j0OEYmCZjn7IeJ9xeRBsbuxlMYOZp5Auf 3Wq5A1nvGST4+2d929iI2fnBicIqa44Y6nc9BrVik9OSP9AA/aTRrUcZGTFvzq+7ivma QtzK9w/7mdVMK/5NdKmf2KYoZDJinrHSyoHuKslpvDStCx7EVmEccJp80z5O0fzYNl2/ uEmdo4InWvcp81LHu//VBuOztCOcexbWnvwzQiLH1uX+Ha99eOO+WWqVdDJzP1bR32Gl UB5izzcMiH+IZ5RfDpBJ4WX1Sog63GfCnEGqrlKvPQNr5Ry9uAIF81McXqXm52XqSgF/ Ms8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YEtveQ5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s185-20020a632cc2000000b0044d72a10aafsi5838907pgs.34.2022.10.28.09.09.43; Fri, 28 Oct 2022 09:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YEtveQ5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbiJ1QBr (ORCPT + 99 others); Fri, 28 Oct 2022 12:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbiJ1P74 (ORCPT ); Fri, 28 Oct 2022 11:59:56 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E36F5214657; Fri, 28 Oct 2022 08:59:01 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id n83so6549650oif.11; Fri, 28 Oct 2022 08:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=kGV5CRuXO/AflfNqwOyb3q124XfnO4+Le7SUJ2VJU3I=; b=YEtveQ5geZPkTIxyIW1RGzgwGnwFThDcL8Wv8vKpWOWescIp3AKZvU140u86bHSctS /WHC/hmjpHBos5Hsg0sNydLxJm4tylUPI8AzWzyWluY1vVuXG/7OjgnTWV2zDOBQ2tgh 2YIIErFMOMyFYdwhQ285czT3VOJpUm8T9YJgxEQvLj1Rd4ZX/bFyImyiSJ0Mc/1okjkI JcInEEarNY+WFTfmOAsL5smiQld4j8i/XdWjxxwznnvmmqB6CYjLjXOT73p7CvI2Dnwr CTHW1+tadB0YLfZ02AD8Tk0QlPInG43fpuM7w8eLUkFLnrVfJ3NmH2HDECrKJlDIDVuA oNlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kGV5CRuXO/AflfNqwOyb3q124XfnO4+Le7SUJ2VJU3I=; b=XjEW36iyuH1+PNyWU3bocMDYjqjjws7diM14xC6V5JAGS56vQDZJW5o/Fe5nYkVHAD X3/zlxPRFmp91T6A7Bz5Ae6YXXVfRTxicKn9CQOLjhJbUEY3GmEoVGwrB92xuut8H4La nOFZLxdXhZFpkfaospJ+4/VyL2Ay7B6qhJrKQBSOcqV7YjIaTBooFDqO5KGRrL3FpPy7 zMpwhuRwMXJSuEy2x3jLs8MeOr5Y6E8wsKV7u7LRh024nC/KSFg4c1Md1Gaku8UaXwII URiUS0JwewA8MVQYJlYI5exi/OFwLPZijlKdF+t1MT1rY7vpIX2JSkTkvVd5PANML5BO JHHw== X-Gm-Message-State: ACrzQf2rc4G/+GP5zNXLeIbuKb9oQHl91g3kjUWyPDugXArEqI8ekjNM jDw4Q3A0Uj0+e03wJq5gUiVCajXYwR4= X-Received: by 2002:a05:6808:2083:b0:355:2c71:7e58 with SMTP id s3-20020a056808208300b003552c717e58mr8578008oiw.168.1666972740889; Fri, 28 Oct 2022 08:59:00 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id l23-20020a544517000000b00359ba124b07sm1626854oil.36.2022.10.28.08.58.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 08:59:00 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Fri, 28 Oct 2022 08:58:58 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: Cristian Marussi Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, Daniel Lezcano , linux-hwmon@vger.kernel.org References: <20221028140833.280091-1-cristian.marussi@arm.com> <20221028140833.280091-7-cristian.marussi@arm.com> From: Guenter Roeck Subject: Re: [PATCH 7/8] hwmon: (scmi) Register explicitly with Thermal Framework In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/22 08:35, Cristian Marussi wrote: [ ... ] >>> + /* >>> + * Try to register a temperature sensor with the Thermal Framework: >>> + * skip sensors not defined as part of any thermal zone (-ENODEV) but >>> + * report any other errors related to misconfigured zones/sensors. >>> + */ >>> + tzd = devm_thermal_of_zone_register(dev, th_sensor->info->id, th_sensor, >>> + &scmi_hwmon_thermal_ops); >>> + if (IS_ERR(tzd)) { >>> + devm_kfree(dev, th_sensor); >>> + >>> + if (PTR_ERR(tzd) != -ENODEV) >>> + return PTR_ERR(tzd); >>> + >>> + dev_info(dev, "Sensor '%s' not attached to any thermal zone.\n", >>> + sensor->name); >> >> There were complaints about this message as it is noisy. If you send >> another version, please drop it unless attaching each sensor to a thermal >> zone is strongly expected. If you don't send another version, I'll drop it >> while applying. >> > > Ok fine for me. I am waiting to have some feedback from Sudeep too, but > I do not have plan for another version as of now. > > As a side note, though, I understand the 'noisiness' argument, but, > sincerely this same message in the original HWMON code was the only > reason why I spotted that something was wrong with the SCMI/HWMON > interactions and discovered the indexes/ids mismatch...if not for > that it would have gone un-noticed that a perfectly configured > ThermalZone/Sensor was not working properly... > (un-noticed at least until something would have been burnt to fire > in my house .. joking :P) > Good point. Did you ever check the returned error code ? Maybe we could use it to distinguish "it is not attached to a thermal zone because it is not associated with one" from "attaching to a thermal zone failed because its configuration is bad/incomplete". Thanks, Guenter