[lkml]   [2007]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/7] Introduce the pagetable_operations and associated helper macros.
On Mon, 2007-03-19 at 13:05 -0700, Adam Litke wrote:
> +#define has_pt_op(vma, op) \
> + ((vma)->pagetable_ops && (vma)->pagetable_ops->op)
> +#define pt_op(vma, call) \
> + ((vma)->pagetable_ops->call)

Can you get rid of these macros? I think they make it a wee bit harder
to read. My brain doesn't properly parse the foo(arg)(bar) syntax.

+ if (has_pt_op(vma, copy_vma))
+ return pt_op(vma, copy_vma)(dst_mm, src_mm, vma);

+ if (vma->pagetable_ops && vma->pagetable_ops->copy_vma)
+ return vma->pagetable_ops->copy_vma(dst_mm, src_mm, vma);

I guess it does lead to some longish lines. Does it start looking
really nasty?

If you're going to have them, it might just be best to put a single
unlikely() around the macro definitions themselves to keep anybody from
having to open-code it for any of the users.

-- Dave

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-03-21 00:27    [W:0.200 / U:0.572 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site