From: Guenter Roeck <linux@roeck-us.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] hwmon: (nct6775) Clean up a condition
Date: Wed, 05 Sep 2018 21:49:21 +0000 [thread overview]
Message-ID: <20180905214921.GA5227@roeck-us.net> (raw)
In-Reply-To: <20180905074655.w6uypipr5lgmpr4g@kili.mountain>
On Wed, Sep 05, 2018 at 10:46:55AM +0300, Dan Carpenter wrote:
> I removed the "dsw_en &&" chunk of the condition because we know that
> "dsw_en" is set.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to hwmon-next.
Thanks,
Guenter
>
> diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
> index 139781ae830b..719effe53ceb 100644
> --- a/drivers/hwmon/nct6775.c
> +++ b/drivers/hwmon/nct6775.c
> @@ -3533,8 +3533,7 @@ nct6775_check_fan_inputs(struct nct6775_data *data)
>
> if (!fan6pin)
> fan6pin = (regval_2a & BIT(4)) &&
> - (!dsw_en ||
> - (dsw_en && (regval_ed & BIT(4))));
> + (!dsw_en || (regval_ed & BIT(4)));
> if (!pwm6pin)
> pwm6pin = (regval_2a & BIT(3)) &&
> (regval_ed & BIT(2));
prev parent reply other threads:[~2018-09-05 21:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <df45855d-e21c-9b29-d661-7284453241fe@roeck-us.net>
2018-09-05 7:46 ` [PATCH 1/2] hwmon: (nct6775) Set weight source to zero correctly Dan Carpenter
2018-09-05 21:48 ` Guenter Roeck
2018-09-05 7:46 ` [PATCH 2/2] hwmon: (nct6775) Clean up a condition Dan Carpenter
2018-09-05 21:49 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180905214921.GA5227@roeck-us.net \
--to=linux@roeck-us.net \
--cc=dan.carpenter@oracle.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox