Re: [PATCH 1/5] PCI: add a define for the PCI resource type mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux