linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: x86@kernel.org
Cc: "Dave Hansen" <dave.hansen@linux.intel.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Matt Roper" <matthew.d.roper@intel.com>
Subject: [PATCH v3 2/3] x86/quirks: Improve line wrap on quirk conditions
Date: Fri,  7 Jan 2022 13:05:15 -0800	[thread overview]
Message-ID: <20220107210516.907834-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20220107210516.907834-1-lucas.demarchi@intel.com>

Remove extra parenthesis and wrap lines so it's easier to read what are
the conditions being checked. The call to the hook also had an extra
indentation: remove here to conform to coding style.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 arch/x86/kernel/early-quirks.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 8b689c2b8cc7..df34963e23bf 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -767,14 +767,12 @@ static int __init check_dev_quirk(int num, int slot, int func)
 	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
 
 	for (i = 0; early_qrk[i].f != NULL; i++) {
-		if (((early_qrk[i].vendor == PCI_ANY_ID) ||
-			(early_qrk[i].vendor == vendor)) &&
-			((early_qrk[i].device == PCI_ANY_ID) ||
-			(early_qrk[i].device == device)) &&
-			(!((early_qrk[i].class ^ class) &
-			    early_qrk[i].class_mask)))
-				early_qrk[i].f(num, slot, func);
-
+		if ((early_qrk[i].vendor == PCI_ANY_ID ||
+		     early_qrk[i].vendor == vendor) &&
+		    (early_qrk[i].device == PCI_ANY_ID ||
+		     early_qrk[i].device == device) &&
+		    !((early_qrk[i].class ^ class) & early_qrk[i].class_mask))
+			early_qrk[i].f(num, slot, func);
 	}
 
 	type = read_pci_config_byte(num, slot, func,
-- 
2.34.1


  reply	other threads:[~2022-01-07 21:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 21:05 [PATCH v3 1/3] x86/quirks: Replace QFLAG_APPLY_ONCE with static locals Lucas De Marchi
2022-01-07 21:05 ` Lucas De Marchi [this message]
2022-01-10 17:11   ` [Intel-gfx] [PATCH v3 2/3] x86/quirks: Improve line wrap on quirk conditions Rodrigo Vivi
2022-01-07 21:05 ` [PATCH v3 3/3] x86/quirks: Fix stolen detection with integrated + discrete GPU Lucas De Marchi
2022-01-08  2:57   ` Bjorn Helgaas
2022-01-10 17:11     ` [Intel-gfx] " Rodrigo Vivi
2022-01-10 17:32       ` Bjorn Helgaas
2022-01-10 17:37         ` Rodrigo Vivi
2022-01-08  2:53 ` [PATCH v3 1/3] x86/quirks: Replace QFLAG_APPLY_ONCE with static locals Bjorn Helgaas
2022-01-12 23:30   ` [PATCH v4] " Lucas De Marchi
2022-01-13  0:08     ` [Intel-gfx] " Bjorn Helgaas
2022-01-13  0:21       ` Lucas De Marchi
2022-01-13  1:06         ` Bjorn Helgaas
2022-01-13  1:28           ` Lucas De Marchi
2022-01-13 20:28             ` Rodrigo Vivi

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=20220107210516.907834-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=bhelgaas@google.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew.d.roper@intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).