[6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal

Message ID 20231124090919.23687-6-ilpo.jarvinen@linux.intel.com
State New
Headers
Series [1/6] x86: Use PCI_HEADER_TYPE_* instead of literals |

Commit Message

Ilpo Järvinen Nov. 24, 2023, 9:09 a.m. UTC
  Replace literal 0x7f with PCI_HEADER_TYPE_MASK.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/bcma/driver_pci_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Kalle Valo Nov. 27, 2023, 7:31 a.m. UTC | #1
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:

> Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

I couldn't find the cover letter. Should I take this patch to
wireless-next or do you have other plans for this?
  
Ilpo Järvinen Nov. 28, 2023, 9:43 a.m. UTC | #2
On Mon, 27 Nov 2023, Kalle Valo wrote:

> Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:
> 
> > Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
> >
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> 
> I couldn't find the cover letter. Should I take this patch to
> wireless-next or do you have other plans for this?

Just take it through the normal trees, so in this case wireless-next. 
Thank you.
  
Kalle Valo Nov. 30, 2023, 7:21 p.m. UTC | #3
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote:

> Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Patch applied to wireless-next.git, thanks.

ac586b8401c9 bcma: Use PCI_HEADER_TYPE_MASK instead of literal
  

Patch

diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index aa0581cda718..ed3be52ab63d 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -280,7 +280,7 @@  static u8 bcma_find_pci_capability(struct bcma_drv_pci *pc, unsigned int dev,
 	/* check for Header type 0 */
 	bcma_extpci_read_config(pc, dev, func, PCI_HEADER_TYPE, &byte_val,
 				sizeof(u8));
-	if ((byte_val & 0x7F) != PCI_HEADER_TYPE_NORMAL)
+	if ((byte_val & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_NORMAL)
 		return cap_ptr;
 
 	/* check if the capability pointer field exists */