From: Guenter Roeck <linux@roeck-us.net>
To: "Saheed O. Bolarinwa" <refactormyself@gmail.com>,
helgaas@kernel.org, Jean Delvare <jdelvare@suse.com>
Cc: bjorn@helgaas.com, skhan@linuxfoundation.org,
linux-pci@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: Re: [RFC PATCH 16/35] hwmon: (sis5595) Change PCIBIOS_SUCCESSFUL to 0
Date: Mon, 13 Jul 2020 22:02:38 -0700 [thread overview]
Message-ID: <cbbdf8c5-347b-0638-bc5f-c6c8469b8aa4@roeck-us.net> (raw)
In-Reply-To: <20200713122247.10985-17-refactormyself@gmail.com>
On 7/13/20 5:22 AM, Saheed O. Bolarinwa wrote:
> In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept.
> Their scope should be limited within arch/x86.
>
> Change all PCIBIOS_SUCCESSFUL to 0
>
> Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
> ---
> drivers/hwmon/sis5595.c | 8 ++++----
> drivers/hwmon/via686a.c | 8 ++++----
> drivers/hwmon/vt8231.c | 8 ++++----
> 3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c
> index 0c6741f949f5..0ea174fb3048 100644
> --- a/drivers/hwmon/sis5595.c
> +++ b/drivers/hwmon/sis5595.c
> @@ -825,7 +825,7 @@ static int sis5595_pci_probe(struct pci_dev *dev,
> pci_write_config_word(dev, SIS5595_BASE_REG, force_addr);
> }
>
> - if (PCIBIOS_SUCCESSFUL !=
> + if (0 !=
> pci_read_config_word(dev, SIS5595_BASE_REG, &address)) {
Yoda programming already terrible is, but "0 !=" is even worse than that
(and completely unnecessary). If you want to clean this up, do it right
and drop those unnecessary comparisons.
Guenter
next prev parent reply other threads:[~2020-07-14 5:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200713122247.10985-1-refactormyself@gmail.com>
2020-07-13 12:22 ` [RFC PATCH 16/35] hwmon: (sis5595) Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-14 5:02 ` Guenter Roeck [this message]
2020-07-13 12:22 ` [RFC PATCH 17/35] hwmon: (sis5595) Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-14 5:04 ` Guenter Roeck
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=cbbdf8c5-347b-0638-bc5f-c6c8469b8aa4@roeck-us.net \
--to=linux@roeck-us.net \
--cc=bjorn@helgaas.com \
--cc=helgaas@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=refactormyself@gmail.com \
--cc=skhan@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).