Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6360325rwi; Sun, 23 Oct 2022 23:35:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ycTT3xBculy9GbGt3VjuzP0yeYpNfE46bUh0RaOuGiyEmNsKujb96ejqkpAibvKUIqiCh X-Received: by 2002:a17:907:608a:b0:791:9dbc:cc11 with SMTP id ht10-20020a170907608a00b007919dbccc11mr25758752ejc.357.1666593346929; Sun, 23 Oct 2022 23:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666593346; cv=none; d=google.com; s=arc-20160816; b=cqutfxZYIk/MkJ1+9pFshiX+0FIvTnOkl3cdAhS5ObJIUyt+EUmM2piLe6qCkqx6au 2uSFK3XbxP5hx6cdnr+tVQedCc+Nl0jdYH8t30uidHHkqwRElX4TbdI4T13nzOtTEWt/ cnBxKJ8QOs/0eqg8Vy+nPh3uKHylwB+smNjjszupJcmVcFl9lrCdiWYG63ZBHpiMeEvV eQZV13YrzRCHhOm3laY8YOacWx86i9CzuT4pF20F4wQXb1POqDrETN5BG7G/Hv9YMrax BztuLUE+aZ20kkrJKeUzw0vgOOw40OnaaclyblHCVA7uG91vrltOm/XNueUUHZujt1Mw QjTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=plo7ZcNTUOJd8dD7xxth6vUEzNTeIeYDiu7M8KSZeoM=; b=uRzXTN2g4X/WyOXLX4qq6z/O0y5DsJb6vtfgmkzw0MhvmpLPGX8enUyNXQH2V3WgWW XOwEYsU7rVo4YXW4stY4Ex9N/yP243RyXeFwXQLCcR7J3LSOhRjlFwCPFSdBLbUJ7clw +zjwzkVBWDqAizyRR0P1I1xwm6W0BxgJivTtkUZBgk2zp8Q0cfwyutq46KuWDxMr4bwi a5xncJyNrGFRDIKK1qCo6iKalIHyWMUD7Nax2Dw4T9lOP9FH6zGGeVgqFDzBneBafqpl HgmlXH3nO0KYielB+EWhA3GtevXMnK/KHiOOuhiiKVPl0hmv5gALQk1jofQF9odo34Fl u/sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cLsmSRL7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce24-20020a170906b25800b0078dd3cf41a1si23186503ejb.158.2022.10.23.23.35.22; Sun, 23 Oct 2022 23:35:46 -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=@kernel.org header.s=k20201202 header.b=cLsmSRL7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbiJXFyL (ORCPT + 99 others); Mon, 24 Oct 2022 01:54:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiJXFyK (ORCPT ); Mon, 24 Oct 2022 01:54:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B9BC5852B for ; Sun, 23 Oct 2022 22:54:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 29D3861012 for ; Mon, 24 Oct 2022 05:54:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82540C4347C for ; Mon, 24 Oct 2022 05:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666590845; bh=IdeoKRp7CnTeQycf+9JLsdNh6b3jxG4J8xktr1nYokc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cLsmSRL7yxCsgsZYI4pkwM4eu2stTLbzCozg1hw8x6YBv7W3s0z2Kbaw5KCs7xjrt new2b7/zUlv/NgqN0ac3LfNw87n4B/V8TuhDvpJdNZZ8RnHM/BbxG4zVW0LQ7m1WA3 0QFUi+gjlBZ2v2A9jnK6l3SU/81kJudtgAUdLkcHbiNvT1u0a9z7tMEJv+z5Y8Ewtn LvYTIWCAbi70BdVdzrLGYGct48kT8tg85q0YZ9yfmyTZQH9ODF2aZqK+xl894gBVBv CrNcmum/oCkE27rwik+Quqh3DT/PdHxZrVIxYzAI3yfTOt6HfwM1MfbiKArdjBnfgJ Oy6nZRHh1inQw== Received: by mail-vs1-f46.google.com with SMTP id h3so6914490vsa.4 for ; Sun, 23 Oct 2022 22:54:05 -0700 (PDT) X-Gm-Message-State: ACrzQf1JaksRGeKQOBOA0gI45xJ6iUjcAEtEDpjh55fBIT45FIODxSBD GR5/BFgG3X0n+acvm07s3OVCoPFjx52X1mGx/Ck1uQ== X-Received: by 2002:a67:d296:0:b0:3a6:ef66:b4cb with SMTP id z22-20020a67d296000000b003a6ef66b4cbmr16546365vsi.30.1666590844366; Sun, 23 Oct 2022 22:54:04 -0700 (PDT) MIME-Version: 1.0 References: <20221020145237.942146-1-luca.weiss@fairphone.com> In-Reply-To: <20221020145237.942146-1-luca.weiss@fairphone.com> From: Amit Kucheria Date: Mon, 24 Oct 2022 11:23:53 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] thermal/drivers/qcom/temp-alarm: fix inaccurate warning for gen2 To: Luca Weiss Cc: linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Stephen Boyd , David Collins , Guru Das Srinagesh , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Thu, Oct 20, 2022 at 8:23 PM Luca Weiss wrote: > > On gen2 chips the stage2 threshold is not 140 degC but 125 degC. > > Make the warning message clearer by using this variable and also by > including the temperature that was checked for. > > Fixes: aa92b3310c55 ("thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 1 PMIC peripherals") > Signed-off-by: Luca Weiss Reviewed-by: Amit Kucheria > --- > drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c > index be785ab37e53..ad84978109e6 100644 > --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c > +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c > @@ -252,7 +252,8 @@ static int qpnp_tm_update_critical_trip_temp(struct qpnp_tm_chip *chip, > disable_s2_shutdown = true; > else > dev_warn(chip->dev, > - "No ADC is configured and critical temperature is above the maximum stage 2 threshold of 140 C! Configuring stage 2 shutdown at 140 C.\n"); > + "No ADC is configured and critical temperature %d mC is above the maximum stage 2 threshold of %ld mC! Configuring stage 2 shutdown at %ld mC.\n", > + temp, stage2_threshold_max, stage2_threshold_max); > } > > skip: > -- > 2.38.1 >