lkml.org 
[lkml]   [2019]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/7] drm/ttm: TTM fault handler helpers
From
Date
On 9/13/19 5:18 PM, Matthew Wilcox wrote:
> 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.

Indeed.

However since this is mostly a restructuring commit and there are a
couple of these present in the code I'd like to keep cleanups separate.

Thanks,
Thomas


\
 
 \ /
  Last update: 2019-09-13 18:09    [W:0.061 / U:2.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site