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]
Date:	Wed, 1 Jun 2016 00:57:57 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Johannes Thumshirn <jthumshirn@...e.de>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] PCI: Add helpers to request/release memory and I/O
 regions

On Tue, May 31, 2016 at 02:05:09PM +0200, Johannes Thumshirn wrote:
> Add helpers to request and release a device's memory or I/O regions.
> 
> With these helpers in place, one does not need to select a device's memory or
> I/O regions with pci_select_bars() prior to requesting or releasing them.
> 
> Suggested-by: Christoph Hellwig <hch@...radead.org>
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
>  include/linux/pci.h | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 932ec74..846f4cf 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2007,6 +2007,35 @@ static inline bool pci_is_dev_assigned(struct pci_dev *pdev)
>  	return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED;
>  }
>  
> +static inline int
> +pci_request_io_regions(struct pci_dev *pdev, const char *name)
> +{
> +	return pci_request_selected_regions(pdev,
> +					    pci_select_bars(pdev, IORESOURCE_IO), name);

Needs a little indentation tweak to not spill over 80 characters.  Two
tabs should be plenty indentation for the continuation of function
arguments.  Ditto for the other functions,

Otherwise looks fine:

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ