[PATCH v5 04/13] staging: unisys: Do not use 0 as the default bus root device number
Dan Carpenter
dan.carpenter at oracle.com
Thu Jun 4 14:19:44 UTC 2015
On Thu, Jun 04, 2015 at 09:22:40AM -0400, Benjamin Romer wrote:
> diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
> index 4dd0a07..618732b 100644
> --- a/drivers/staging/unisys/visorbus/visorchipset.c
> +++ b/drivers/staging/unisys/visorbus/visorchipset.c
> @@ -56,6 +56,8 @@
> #define UNISYS_SPAR_ID_ECX 0x70537379
> #define UNISYS_SPAR_ID_EDX 0x34367261
>
> +#define BUS_ROOT_DEVICE UINT_MAX
> +
> /*
> * Module parameters
> */
> @@ -727,8 +729,8 @@ static int match_visorbus_dev_by_id(struct device *dev, void *data)
> u32 bus_no = id->bus_no;
> u32 dev_no = id->dev_no;
>
> - if (((bus_no == -1) || (vdev->chipset_bus_no == bus_no)) &&
> - ((dev_no == -1) || (vdev->chipset_dev_no == dev_no)))
> + if ((vdev->chipset_bus_no == bus_no) &&
> + (vdev->chipset_dev_no == dev_no))
> return 1;
This talk about "root device" confuses me. I thought that -1 was a wild
card. Anyway, we introduce the BUS_ROOT_DEVICE macro but don't use it.
Shouldn't it be defined as 0 since that it the root device?
regards,
dan carpenter
More information about the devel
mailing list