lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160610161343.GH19309@localhost>
Date:	Fri, 10 Jun 2016 11:13:43 -0500
From:	Bjorn Helgaas <helgaas@...nel.org>
To:	Thierry Reding <thierry.reding@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	"James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@...cle.com>,
	linux-pci@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] PCI: Use device_match_always()

On Mon, Jun 06, 2016 at 09:32:37AM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@...dia.com>
> 
> There is now a common implementation for a match function that will
> always match, so the PCI-specific implementation can be removed.
> 
> Signed-off-by: Thierry Reding <treding@...dia.com>

Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>

I'm sort of OK with this.  It's clearly not going to break anything.

But I would far rather figure out a way to remove no_pci_devices()
completely.  There's only one in-tree caller, and it's sort of
dubious, although the idea was added by Linus (2bff5e94f1bf).

I suppose nowadays we would use ACPI or DMI to do this.  But I guess
this is OK as-is.  It'd be pretty hard to find a PC110 to test any
real driver changes.

I assume all three of these patches would get merged together by
somebody else.

> ---
>  drivers/pci/probe.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 8e3ef720997d..3db06d8d6497 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -62,11 +62,6 @@ static struct resource *get_pci_domain_busn_res(int domain_nr)
>  	return &r->res;
>  }
>  
> -static int find_anything(struct device *dev, void *data)
> -{
> -	return 1;
> -}
> -
>  /*
>   * Some device drivers need know if pci is initiated.
>   * Basically, we think pci is not initiated when there
> @@ -77,7 +72,7 @@ int no_pci_devices(void)
>  	struct device *dev;
>  	int no_devices;
>  
> -	dev = bus_find_device(&pci_bus_type, NULL, NULL, find_anything);
> +	dev = bus_find_device(&pci_bus_type, NULL, NULL, device_match_always);
>  	no_devices = (dev == NULL);
>  	put_device(dev);
>  	return no_devices;
> -- 
> 2.8.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ