Message ID | 20230409183549.12683-1-savicaleksa83@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1497890vqo; Sun, 9 Apr 2023 11:43:41 -0700 (PDT) X-Google-Smtp-Source: AKy350YvaZJ06fbnPakRPnMIoUHqoaNTPyCEgg7VxVW8XBmSqc6cwaJjRfyZz0in42sVRtfAfuqt X-Received: by 2002:a17:906:2011:b0:93d:7ad:a954 with SMTP id 17-20020a170906201100b0093d07ada954mr5597543ejo.37.1681065821687; Sun, 09 Apr 2023 11:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681065821; cv=none; d=google.com; s=arc-20160816; b=pN6F6JHqZjvnlymwdBdJq9i2xUy5JacD9KbhW7wF+pvN+FZtXpdCIUWIDXyU7FQTZp 8XOemXx9yiKo/gBSDWm3jyZ2+yHcDmr9nqugBUOtKxknPd+4Od8wxPB+HNfYhd0C4oBh vdFOeY0xKeyxlR2ndG1KN0rBFgvNjhHxg7yQb5P7m7lNEDaVqAXLKYoJLREJxfx+JG76 I+PLgxg5Cr+lBexWgzrUYrXorxrin4sl5kE4hkzWMOLqk+eI1+RQZhmzZUAaB8v+O+Vy F7kqfNFiF+j17K80M59lcGjwWlroOTDaFGgcuWUytxXEQC3DgXpyZsdPYb6WyHrSG4gY RQrg== 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=2y4ygWlp1XtLpzWSCbAKMVQBAQ+UpChcysa/+QsWFe8=; b=CwKjxE0IEN3Omc75WZ+cmx6n8X89cntOCufaPnzZZ1SIuNhOBltLamqIRtEp73O4KO qMLX/h4eRkv/VdJ3PEs7ZopwUx1TZ/Rg1XctehYvDEo5/NzpL6zlYAl0scOWdoImCBJ3 RT/EvObp5fwMcu75W3x3XC9Dnl4UtfiokcM83zhEE4J1PEED2mhYewWwABn1bNmoFOdQ cL1lbAqXOF3nwH7nNelkSmsfnSINiwv649GCSfoD1XitrGm8Uv8rk0CikzjEzOYsO4FK A6LVHyXEJ6ZQoVAoXtV0Yf3UiKaVk5CPaPC7v7ZyRYvVuvW+qrG/x7VSkgids7fbO1P6 hsIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FXntkwsh; 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 q14-20020a1709060f8e00b0093175b7c1e3si3484367ejj.870.2023.04.09.11.43.14; Sun, 09 Apr 2023 11:43:41 -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=FXntkwsh; 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 S229614AbjDISgf (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sun, 9 Apr 2023 14:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDISgd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 9 Apr 2023 14:36:33 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F31C2718; Sun, 9 Apr 2023 11:36:31 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id sb12so7888176ejc.11; Sun, 09 Apr 2023 11:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681065390; x=1683657390; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2y4ygWlp1XtLpzWSCbAKMVQBAQ+UpChcysa/+QsWFe8=; b=FXntkwshA1IsfYDjrBcvGOpZG+U4tpT5QTkAhX6HCQrlE8Jhbb+4XWAIEzoDq+i6fT pTD2oxQOcOnY/V/hq49mBE2Nr8wCI/2iHQ3bWQv9hAPW8xgmk3OI4e2TpU2orpAuqNDR 73BrLafMJRgkLsUsIPI3JxN1GSH/ZQmWcoROZX8Ry4gAiKSv3gl8XybaUu6BrXeohDOK tQbI+290+EuuaiCvNSjl2ApHpvU+dAiEoWYfhy+tfbZp1qNfTptQf4ciHKxZ25EI4Lsh k2msxKKPCyf9oq9nWrEmPswmAsGdGe930O0X/roiPlFmEsw8QsMh0IF3KR5uqzSjEEwE UpKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681065390; x=1683657390; 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=2y4ygWlp1XtLpzWSCbAKMVQBAQ+UpChcysa/+QsWFe8=; b=Y5GoIstmSAgn0KRPCsqJ+DQ2GUG1d2gqD66nRZ5QH13CNaN9Xziqa27nMq6+lqLuzE w98htGt8fLlKJ55Au+qMdIBng9dCwiO4/RtjgXt0upKn3uXuzX0baRjAWT+PRcrFuKRy qi9eCG4XeJvsbzVPmcx3LDuEILwNA9ke4NNd/4UutBS5Jp5B2lnz/qnRbBBpCgzgHCVv T+kshmffTSW+LfqBq+QTpnj/h9vcRVQvREc0M4Ok5Fr2yGFM/tugv6Cm2e4P1k/uyhBy 0hsMhh/wwXf3aWBh03gpV4Xvqv3xsamBXmLeB7NdI4UCoEEnR4HLW6I3HRjI58LvpEtZ c6CQ== X-Gm-Message-State: AAQBX9f84TsnIBc4usEHOp6Smx1gBfETEhFGSaCGqEKt4McmjlqBzsUK yws6oDnyaTYD7wNYJN3j3z9FevJu6fI= X-Received: by 2002:a17:907:1ca3:b0:92e:eecf:b742 with SMTP id nb35-20020a1709071ca300b0092eeecfb742mr6688894ejc.2.1681065389722; Sun, 09 Apr 2023 11:36:29 -0700 (PDT) Received: from fedora.. ([87.116.164.178]) by smtp.gmail.com with ESMTPSA id op14-20020a170906bcee00b0093408d33875sm4324095ejb.49.2023.04.09.11.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Apr 2023 11:36:29 -0700 (PDT) From: Aleksa Savic <savicaleksa83@gmail.com> To: linux-hwmon@vger.kernel.org Cc: Aleksa Savic <savicaleksa83@gmail.com>, Jack Doan <me@jackdoan.com>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Leonard Anderweit <leonard.anderweit@gmail.com>, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params Date: Sun, 9 Apr 2023 20:35:49 +0200 Message-Id: <20230409183549.12683-1-savicaleksa83@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762725274818735994?= X-GMAIL-MSGID: =?utf-8?q?1762725274818735994?= |
Series |
hwmon: (aquacomputer_d5next) Fix alignment of function call params
|
|
Commit Message
Aleksa Savic
April 9, 2023, 6:35 p.m. UTC
checkpatch warns that alignment of parameters of function call around
line 869 is off. Indent them properly.
Fixes: 6f5cdf9b9a86 ("hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
---
drivers/hwmon/aquacomputer_d5next.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Sun, Apr 09, 2023 at 08:35:49PM +0200, Aleksa Savic wrote: > checkpatch warns that alignment of parameters of function call around > line 869 is off. Indent them properly. > > Fixes: 6f5cdf9b9a86 ("hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero") > Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> > --- > drivers/hwmon/aquacomputer_d5next.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c > index 3bd35d833e69..7db7769fe044 100644 > --- a/drivers/hwmon/aquacomputer_d5next.c > +++ b/drivers/hwmon/aquacomputer_d5next.c > @@ -867,8 +867,8 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, > switch (priv->kind) { > case aquaero: > ret = aqc_get_ctrl_val(priv, > - AQUAERO_CTRL_PRESET_START + channel * AQUAERO_CTRL_PRESET_SIZE, > - val, AQC_BE16); > + AQUAERO_CTRL_PRESET_START + > + channel * AQUAERO_CTRL_PRESET_SIZE, val, AQC_BE16); I am not sure I understand how this would improve readability. It seems to accomplish the opposite. Sure, I know, checkpatch --strict complains, but that is still better than unreadable code just to make checkpatch happy. Guenter
On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote: > > I am not sure I understand how this would improve readability. > It seems to accomplish the opposite. Sure, I know, checkpatch --strict > complains, but that is still better than unreadable code just to make > checkpatch happy. > > Guenter Both seemed fine to me, the idea was to fix the checkpatch warning. If it's OK for it to complain about this, plus the changes would make it harder to read, please ignore this patch. Thanks, Aleksa
On Tue, Apr 11, 2023 at 08:26:32PM +0200, Aleksa Savic wrote: > On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote: > > > > I am not sure I understand how this would improve readability. > > It seems to accomplish the opposite. Sure, I know, checkpatch --strict > > complains, but that is still better than unreadable code just to make > > checkpatch happy. > > > > Guenter > > Both seemed fine to me, the idea was to fix the checkpatch warning. > If it's OK for it to complain about this, plus the changes would make it > harder to read, please ignore this patch. > checkpatch is useful, but not in situations where following its guidance results in code which is diffficult to read. I run checkpatch --strict when applying patches, so I do notice when it complains. If I want a report to be addressed, I'll say that (such as, for example, when people are overly generous with empty lines). If not, you can assume that I am ok with the report and find it more important to have readable code than being checkpatch-clean. Guenter
On 2023-04-11 22:19:21 GMT+02:00, Guenter Roeck wrote: > On Tue, Apr 11, 2023 at 08:26:32PM +0200, Aleksa Savic wrote: >> On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote: >>> >>> I am not sure I understand how this would improve readability. >>> It seems to accomplish the opposite. Sure, I know, checkpatch --strict >>> complains, but that is still better than unreadable code just to make >>> checkpatch happy. >>> >>> Guenter >> >> Both seemed fine to me, the idea was to fix the checkpatch warning. >> If it's OK for it to complain about this, plus the changes would make it >> harder to read, please ignore this patch. >> > > checkpatch is useful, but not in situations where following its guidance > results in code which is diffficult to read. I run checkpatch --strict when > applying patches, so I do notice when it complains. If I want a report > to be addressed, I'll say that (such as, for example, when people are > overly generous with empty lines). If not, you can assume that I am ok with > the report and find it more important to have readable code than being > checkpatch-clean. > > Guenter That clears it up, thanks! Aleksa
diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index 3bd35d833e69..7db7769fe044 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -867,8 +867,8 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, switch (priv->kind) { case aquaero: ret = aqc_get_ctrl_val(priv, - AQUAERO_CTRL_PRESET_START + channel * AQUAERO_CTRL_PRESET_SIZE, - val, AQC_BE16); + AQUAERO_CTRL_PRESET_START + + channel * AQUAERO_CTRL_PRESET_SIZE, val, AQC_BE16); if (ret < 0) return ret; *val = aqc_percent_to_pwm(*val);