Re: [PATCH] Make shr to divide by power of 2 (resend)

From: Sergey Senozhatsky
Date: Sat Aug 15 2009 - 10:30:39 EST


On (08/15/09 09:49), Robert P. J. Day wrote:
> it does seem like a DIV_ROUND_UP would be better but perhaps another
> solution would be to define a meaningful macro name for that
> operation. if that conversion is going to be done regularly, a macro
> with an informative name might be in order. if it's a one-shot
> operation, though, not much point.
>

There are different shr/shl operations in bitblit.c. Like,
cur_height = vc->vc_font.height >> 1
cur_height = (vc->vc_font.height << 1)/3;
c |= c >> 1;
u32 idx = vc->vc_font.width >> 3;
etc.

So I don't think we really need a macros here.

Sergey

Attachment: signature.asc
Description: Digital signature