Re: [PATCH 5/5] checks: Add bus checks for PCI buses

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

 




Quoting Rob Herring (2017-01-24 09:45:34)
> @@ -587,7 +592,88 @@ static void fixup_path_references(struct check *c, struct dt_info *dti,
>  }
>  ERROR(path_references, fixup_path_references, NULL, &duplicate_node_names);
>  
> +static bool is_pci_bridge(struct node *node)
> +{
> +       struct property *prop;
> +
> +       prop = get_property(node, "device_type");
> +       if (!prop)
> +               return false;
> +
> +       if (strcmp(prop->val.val, "pci") == 0)
> +               return true;
> +
> +       return false;

This could be simplified?

	return strcmp(prop->val.val, "pci") == 0;

> +}
> +
[...]
> +
> +struct bus_type pci_bus_type = {

static? const?

> +        .bridge_is_type = is_pci_bridge,
> +        .check_bridge = pci_check_bridge,
> +        .check_device = pci_check_device,
> +};
> +
>  struct bus_type *bus_types[] = {

static? const?

> +       &pci_bus_type,
>         NULL
>  };
>  
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux