public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make shr to divide by power of 2 (resend)
@ 2009-08-15 13:43 Sergey Senozhatsky
  2009-08-15 13:48 ` Jiri Slaby
  0 siblings, 1 reply; 14+ messages in thread
From: Sergey Senozhatsky @ 2009-08-15 13:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Make an arithmetic right shift to divide by power of 2.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index 69864b1..b816151 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -144,7 +144,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
 		      int fg, int bg)
 {
 	struct fb_image image;
-	u32 width = (vc->vc_font.width + 7)/8;
+	u32 width = (vc->vc_font.width + 7) >> 3;
 	u32 cellsize = width * vc->vc_font.height;
 	u32 maxcnt = info->pixmap.size/cellsize;
 	u32 scan_align = info->pixmap.scan_align - 1;

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-08-17  8:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-15 13:43 [PATCH] Make shr to divide by power of 2 (resend) Sergey Senozhatsky
2009-08-15 13:48 ` Jiri Slaby
2009-08-15 13:49   ` Robert P. J. Day
2009-08-15 14:12     ` Sergey Senozhatsky
2009-08-15 20:42       ` Jiri Slaby
2009-08-16  9:14         ` Sergey Senozhatsky
2009-08-17  7:15           ` Jiri Slaby
2009-08-17  7:31             ` Sergey Senozhatsky
2009-08-17  7:48               ` [PATCH 1/1] VIDEO: console, use DIV_ROUND_UP Jiri Slaby
2009-08-17  8:00                 ` Sergey Senozhatsky
2009-08-17  8:00                   ` Jiri Slaby
2009-08-17  8:08                     ` Sergey Senozhatsky
2009-08-17  8:11                       ` Jiri Slaby
2009-08-15 14:26     ` [PATCH] Make shr to divide by power of 2 (resend) Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox