lkml.org 
[lkml]   [2007]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH x86/mm 08/11] x86 ia32 ptrace getreg/putreg merge
Christoph Hellwig wrote:
> On Thu, Nov 29, 2007 at 04:00:31AM -0800, Roland McGrath wrote:
>> +#define R32(l,q) \
>> + case offsetof(struct user32, regs.l): \
>> + regs->q = value; break
>> +
>> +#define SEG32(rs) \
>> + case offsetof(struct user32, regs.rs): \
>> + return set_segment_reg(child, \
>> + offsetof(struct user_regs_struct, rs), \
>> + value); \
>> + break
>
> The code would be a lot more readable if you just opencoded this in the
> caller instead of these obsfucated macros.
>

For better or worse, though, that is style of existing code. I
personally found it easy to deal with when I went through the code recently.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-29 19:07    [W:0.189 / U:0.340 seconds]
©2003-2014 Jasper Spaans. Advertise on this site