[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190913151803.GO29434@bombadil.infradead.org>
Date: Fri, 13 Sep 2019 08:18:03 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Thomas Hellström (VMware)
<thomas_os@...pmail.org>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-mm@...ck.org, pv-drivers@...are.com,
linux-graphics-maintainer@...are.com,
Thomas Hellstrom <thellstrom@...are.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Will Deacon <will.deacon@....com>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...riel.com>,
Minchan Kim <minchan@...nel.org>,
Michal Hocko <mhocko@...e.com>,
Huang Ying <ying.huang@...el.com>,
Souptick Joarder <jrdr.linux@...il.com>,
Jérôme Glisse <jglisse@...hat.com>,
Christian König <christian.koenig@....com>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [RFC PATCH 3/7] drm/ttm: TTM fault handler helpers
On Fri, Sep 13, 2019 at 11:32:09AM +0200, Thomas Hellström (VMware) wrote:
> +vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
> + pgprot_t prot,
> + pgoff_t num_prefault)
> +{
> + struct vm_area_struct *vma = vmf->vma;
> + struct vm_area_struct cvma = *vma;
> + struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
> + vma->vm_private_data;
It's a void *. There's no need to cast it.
struct ttm_buffer_object *bo = vma->vm_private_data;
conveys exactly the same information to both the reader and the compiler,
except it's all on one line instead of split over two.
Powered by blists - more mailing lists