From: Christoph Hellwig <hch@infradead.org>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] PCI: Add helpers to request/release memory and I/O regions
Date: Wed, 1 Jun 2016 00:57:57 -0700 [thread overview]
Message-ID: <20160601075757.GA11923@infradead.org> (raw)
In-Reply-To: <a068e858f5e115ebb3a841e4564aec8523a154f6.1464694724.git.jthumshirn@suse.de>
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@infradead.org>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.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@lst.de>
next prev parent reply other threads:[~2016-06-01 7:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 12:05 [PATCH 0/5] Introduce pci_(request|release)_(mem|io)_regions Johannes Thumshirn
2016-05-31 12:05 ` [PATCH 1/5] PCI: Add helpers to request/release memory and I/O regions Johannes Thumshirn
2016-06-01 7:57 ` Christoph Hellwig [this message]
2016-05-31 12:05 ` [PATCH 2/5] NVMe: Use pci_(request|release)_mem_regions Johannes Thumshirn
2016-06-01 7:58 ` Christoph Hellwig
2016-05-31 12:05 ` [PATCH 3/5] scsi: " Johannes Thumshirn
2016-06-01 7:59 ` Christoph Hellwig
2016-06-01 8:04 ` Johannes Thumshirn
2016-05-31 12:05 ` [PATCH 4/5] GenWQE: " Johannes Thumshirn
2016-05-31 12:05 ` [PATCH 5/5] ethernet: " Johannes Thumshirn
2016-06-01 7:59 ` Christoph Hellwig
2016-06-01 8:51 ` Johannes Thumshirn
2016-06-01 14:56 ` Jeff Kirsher
2016-06-01 15:26 ` Johannes Thumshirn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160601075757.GA11923@infradead.org \
--to=hch@infradead.org \
--cc=bhelgaas@google.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).