From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF02A26ACF for ; Fri, 1 Dec 2023 20:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OmCqXnAH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2CD9C433C7; Fri, 1 Dec 2023 20:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701463489; bh=R0KLOaBddoeXEw/EtG4OX2U5+CrTSAjm9fGyYL9KSqs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OmCqXnAHiVuL9yQlbR2ds/qVSUIw9nC0VsUXeymmKDx5pmaN8Ehe5qLt+bRqvSANy +VBAJQZjGJWozu223P1INBj0XYjwPsCUlsbkx5dukIPV4V02FYjb68VClUs6dZjbIR PSwturEf88P9HidF7ldAlwikwepmVimtKbuNK/IuWLwcHOcblS5y3/M3I1vKb8+0eh i1pdMLjXebTwxni4wsWU7sBSfQEjmmyqpmIjRuJQSNx3OKxbc2tzcFwUblHmrY+Ux3 UDHFjkYDbow5mzm48yMw/XrG/+2r/iVCsCNfXcgxqF8obcB1fDco37/reYksHvKxjv aydNrClft96bw== Date: Fri, 1 Dec 2023 14:44:47 -0600 From: Bjorn Helgaas To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Message-ID: <20231201204447.GA527927@bhelgaas> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote: > Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines. > > Signed-off-by: Ilpo Järvinen Applied entire series on the PCI "enumeration" branch for v6.8, thanks! If anybody wants to take pieces separately, let me know and I'll drop from PCI. > --- > arch/x86/kernel/aperture_64.c | 3 +-- > arch/x86/kernel/early-quirks.c | 4 ++-- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c > index 4feaa670d578..89c0c8a3fc7e 100644 > --- a/arch/x86/kernel/aperture_64.c > +++ b/arch/x86/kernel/aperture_64.c > @@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp) > order); > } > > - /* No multi-function device? */ > type = read_pci_config_byte(bus, slot, func, > PCI_HEADER_TYPE); > - if (!(type & 0x80)) > + if (!(type & PCI_HEADER_TYPE_MFD)) > break; > } > } > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c > index a6c1867fc7aa..59f4aefc6bc1 100644 > --- a/arch/x86/kernel/early-quirks.c > +++ b/arch/x86/kernel/early-quirks.c > @@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func) > type = read_pci_config_byte(num, slot, func, > PCI_HEADER_TYPE); > > - if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) { > + if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) { > sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS); > if (sec > num) > early_pci_scan_bus(sec); > } > > - if (!(type & 0x80)) > + if (!(type & PCI_HEADER_TYPE_MFD)) > return -1; > > return 0; > -- > 2.30.2 >