lkml.org 
[lkml]   [2012]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/6] kenrel.h: add ALIGN_OF_LAST_BIT()
On Tue, 20 Mar 2012, Alexey Dobriyan wrote:

> >> +#define ALIGN_OF_LAST_BIT(x)   ((((x)^((x) - 1))>>1) + 1)
> >
> >
> > Wouldn't ALIGNMENT() be less confusing? After all, that's what this macro is
> > calculating, right? Alignment of given address.
>
> Bits do not have alignment because they aren't directly addressable.
> Can you hardcode this sequence with comment, because it looks too
> special for macro.

Some sane naming please. This is confusing.
\
 
 \ /
  Last update: 2012-03-20 15:11    [W:0.046 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site