Re: [PATCH 1/5] PCI: add a define for the PCI resource type mask
From: Andy Shevchenko
Date: Sun May 07 2017 - 18:17:04 EST
On Thu, May 4, 2017 at 12:31 PM, Christian KÃnig
<deathsimple@xxxxxxxxxxx> wrote:
> From: Christian KÃnig <christian.koenig@xxxxxxx>
>
> We use this mask multiple times in the bus setup.
Couple of nitpicks below.
Otherwise, FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> +#define PCI_RES_TYPE_MASK (IORESOURCE_IO | IORESOURCE_MEM | \
> + IORESOURCE_PREFETCH | IORESOURCE_MEM_64)
I would go with following indentation:
#define PCI_RES_TYPE_MASK \
(IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH | IORESOURCE_MEM_64)
or (if it doesn't fit well)
#define PCI_RES_TYPE_MASK \
(IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH | \
IORESOURCE_MEM_64)
> pci_bus_release_bridge_resources(fail_res->dev->bus,
> - fail_res->flags & type_mask,
> + fail_res->flags &
> + PCI_RES_TYPE_MASK,
I would leave it on one line even if it goes as far as ~85ish column.
> pci_bus_release_bridge_resources(fail_res->dev->bus,
> - fail_res->flags & type_mask,
> + fail_res->flags &
> + PCI_RES_TYPE_MASK,
Ditto.
--
With Best Regards,
Andy Shevchenko