[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo6zpqkVZA-tbb8zXd9=WQ71JUCNPwDzx=009=Kv8tHgGw@mail.gmail.com>
Date: Mon, 15 Apr 2013 12:09:34 -0600
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Libin <huawei.libin@...wei.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
David Airlie <airlied@...ux.ie>,
"Hans J. Koch" <hjk@...sjkoch.de>,
Petr Vandrovec <petr@...drovec.name>,
Andrew Morton <akpm@...ux-foundation.org>,
Konstantin Khlebnikov <khlebnikov@...nvz.org>,
Thomas Hellstrom <thellstrom@...are.com>,
Dave Airlie <airlied@...hat.com>,
Nadia Yvette Chambers <nyc@...omorphy.com>,
Jiri Kosina <jkosina@...e.cz>,
Al Viro <viro@...iv.linux.org.uk>,
Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
Rik van Riel <riel@...hat.com>,
David Rientjes <rientjes@...gle.com>,
Michel Lespinasse <walken@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
DRI mailing list <dri-devel@...ts.freedesktop.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
linux-mm@...ck.org, Hanjun Guo <guohanjun@...wei.com>,
Yijing Wang <wangyijing@...wei.com>
Subject: Re: [PATCH 2/6] PCI: use vma_pages() to replace (vm_end - vm_start)
>> PAGE_SHIFT
On Mon, Apr 15, 2013 at 6:48 AM, Libin <huawei.libin@...wei.com> wrote:
> (*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented
> as a inline funcion vma_pages() in linux/mm.h, so using it.
>
> Signed-off-by: Libin <huawei.libin@...wei.com>
Applied to my pci/misc branch for v3.10, thanks!
Bjorn
> ---
> drivers/pci/pci-sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 9c6e9bb..5b4a9d9 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -897,7 +897,7 @@ int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma,
>
> if (pci_resource_len(pdev, resno) == 0)
> return 0;
> - nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
> + nr = vma_pages(vma);
> start = vma->vm_pgoff;
> size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1;
> pci_start = (mmap_api == PCI_MMAP_PROCFS) ?
> --
> 1.8.2.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists