Message ID | 20230714120712.16721-1-savicaleksa83@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2466029vqm; Fri, 14 Jul 2023 05:25:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGecwkMpROBYHl0ImnCWxwiGfrC/+4MHFWxDiJGNuypIvJc1e/skOTg350gh0gOlG7ZusRA X-Received: by 2002:a5e:9815:0:b0:783:4bc6:636e with SMTP id s21-20020a5e9815000000b007834bc6636emr4325630ioj.21.1689337511718; Fri, 14 Jul 2023 05:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689337511; cv=none; d=google.com; s=arc-20160816; b=wX+Pq36peBTRUPCthIFu7ruySFJIV00jRO1yxt+L+lXIOnt6mW4CVtuO6Xsnu+eMvA /f3y/DTsC9xMpyYEG37HSP0UenK2dw93Jb60QY5QM7z+abek/jrvaBUIFLn6usBPbGb+ eJBCz+jEBj4omqUIqGOiwRZgFt//Srsz3aqhX3Y4XyHkHSyxGJ1SUt1PcFA2cAmzOv9+ 8qU9WmzB4GN1gYOygo9wR0yZdv2IrMVQeHbxHrUZ7lKzaXz5b3msQC+mPBhb3q0BOFOd a3FWld6rxqfCMQA57D+WQxZD2G2fD7TjQoyTmph06WallahLD3oZcaUSUx5oUV8eD/9r da8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; fh=cQJG9ncmUHEi5k8VvGL8cvRcAY6ILGkce8QR4cRkijg=; b=y10bmJ6o6Af1yFjoe1oard6AlBmC2BZZCFSzwfFRyNw/L88HkqqL9q+vBxD0Ze2tWQ ZFAyYsiG/0gpc7AM6iFjAaVTc75RGyu+pfcMA3LFURqWeQS4pxj0rc6mcW3bhnGgIS+8 +YTLJX4pE+svDqc5X1fNsk+1pE+9451oD7DC2PiMKz7qeO0MfpN1Bu2MzesX+yo+/r6/ MqAYr4EGu6zSBel/dS7UZ+GUHQcAglEfnfveiU7IMHarvis5GS2Mf9JARC62821d/8r5 g7Aq3THJV1hhZXUfXNFwKNy+EGKdpFm7ectdM8ie3GHUbM97026wLJyFhSi+puHKdjW7 qnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=aVNQhIPQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a6560cd000000b0055b0e39eed2si6896560pgv.107.2023.07.14.05.24.59; Fri, 14 Jul 2023 05:25:11 -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=20221208 header.b=aVNQhIPQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235693AbjGNMIj (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Fri, 14 Jul 2023 08:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235132AbjGNMIh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2023 08:08:37 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5210E358D; Fri, 14 Jul 2023 05:08:34 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9922d6f003cso241551366b.0; Fri, 14 Jul 2023 05:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689336512; x=1691928512; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; b=aVNQhIPQ1nkqW5pkVpZdSjcL6JZy9VedWY2TZHdFs0Lu7/c2LpssorRCvcSTCioaBA iCNUmw5Efykan1bmbS11TBRHhNY3ryMQACoTDO11aEOvIA3kIgnLF6dBa9fZsYyxECFi n9XU5n+danqERRXMIbR/IXKpBwwnrrhHFYBDH1Oi1mRB4ImVyNclf9Zjwq1/8V2jcMR/ n6p83BdU82ZU2WHwVFkNeZO3bAnDwdSeqEKNiA4spxHbzZQb+HBORs+Pks5oswT19hHG V8ItEOdMC/5XGUFGzrKsqw3xUop9xFU6nkbZBGRUXJKabP834zs2VNGCbMlIUPr50Qcu +y1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689336512; x=1691928512; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; b=Fvug0N5fFmFXO4OnXDFiUkS/rDF2h1IMcfoqYYPAnVI6hRkmcO+5uwXCRKrEwhn7gt 1GZN+ZM4jXozC0UOY6hDvHFyxB2KFewCJxj8DPQ/zPmklCDYD5DQtIIuChmq2mNC0BOJ zyYQgU1MASk+fBzVlHpxhHS3idsmYJBrbyiMHe6X7LeYTWbnZXbnUuz2G1j1upPI+ZVk FWjHOWt5P84gN5oZNNYSg8Hn+BsrjuygIkGVUIAkoaiL2bGqNRZH6v63A/IbGO+BCTEk 37Uu/F+RsyGEPI58ARYzBV3ky0alyxIZNf03QT1Dn/doo3jaxRQWewNsihIZvKGcOUNR h8zA== X-Gm-Message-State: ABy/qLb270s/iCuGMAr17mIeIs1H6sriNBgmQdfYBsztfOYbx8+bS0th zP0tPgRg9npOIKeYxANZdNWmNrUrsLa7YA== X-Received: by 2002:a17:906:ce3a:b0:988:9d0f:db52 with SMTP id sd26-20020a170906ce3a00b009889d0fdb52mr3941880ejb.35.1689336512361; Fri, 14 Jul 2023 05:08:32 -0700 (PDT) Received: from fedora.. (cable-178-148-234-71.dynamic.sbb.rs. [178.148.234.71]) by smtp.gmail.com with ESMTPSA id hb24-20020a170906b89800b00977c7566ccbsm5238148ejb.164.2023.07.14.05.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 05:08:31 -0700 (PDT) From: Aleksa Savic <savicaleksa83@gmail.com> To: linux-hwmon@vger.kernel.org Cc: Aleksa Savic <savicaleksa83@gmail.com>, stable@vger.kernel.org, Jack Doan <me@jackdoan.com>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (aquacomputer_d5next) Fix incorrect PWM value readout Date: Fri, 14 Jul 2023 14:07:11 +0200 Message-ID: <20230714120712.16721-1-savicaleksa83@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771398770569461060 X-GMAIL-MSGID: 1771398770569461060 |
Series |
hwmon: (aquacomputer_d5next) Fix incorrect PWM value readout
|
|
Commit Message
Aleksa Savic
July 14, 2023, 12:07 p.m. UTC
Commit 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for
temperature sensor offsets") changed aqc_get_ctrl_val() to return
the value through a parameter instead of through the return value,
but didn't fix up a case that relied on the old behavior. Fix it
to use the proper received value and not the return code.
Fixes: 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets")
Cc: stable@vger.kernel.org
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
---
drivers/hwmon/aquacomputer_d5next.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Jul 14, 2023 at 02:07:11PM +0200, Aleksa Savic wrote: > Commit 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for > temperature sensor offsets") changed aqc_get_ctrl_val() to return > the value through a parameter instead of through the return value, > but didn't fix up a case that relied on the old behavior. Fix it > to use the proper received value and not the return code. > > Fixes: 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets") > Cc: stable@vger.kernel.org > Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Applied. Thanks, Guenter > --- > drivers/hwmon/aquacomputer_d5next.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c > index a981f7086114..a997dbcb563f 100644 > --- a/drivers/hwmon/aquacomputer_d5next.c > +++ b/drivers/hwmon/aquacomputer_d5next.c > @@ -1027,7 +1027,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, > if (ret < 0) > return ret; > > - *val = aqc_percent_to_pwm(ret); > + *val = aqc_percent_to_pwm(*val); > break; > } > break;
diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index a981f7086114..a997dbcb563f 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -1027,7 +1027,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, if (ret < 0) return ret; - *val = aqc_percent_to_pwm(ret); + *val = aqc_percent_to_pwm(*val); break; } break;