From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sun, 18 Dec 2011 14:00:18 -0500 Subject: [U-Boot] [PATCH 08/16] drivers/video/cfb_console.c: Add function console_clear and console_clear_line In-Reply-To: <1324141398-14859-8-git-send-email-pali.rohar@gmail.com> References: <2772527.Czs1Sl5aoH@pali-elitebook> <1324141398-14859-1-git-send-email-pali.rohar@gmail.com> <1324141398-14859-8-git-send-email-pali.rohar@gmail.com> Message-ID: <201112181400.20179.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday 17 December 2011 12:03:10 Pali Roh?r wrote: > --- a/drivers/video/cfb_console.c > +++ b/drivers/video/cfb_console.c > > +static void console_clear_line(int line, int begin, int end) > +{ > +#ifdef VIDEO_HW_RECTFILL > + video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */ > + VIDEO_FONT_WIDTH * begin, /* dest pos x */ /* FIXME: correct? */ > + video_logo_height + CONSOLE_ROW_SIZE * line, /* dest pos y */ /* > FIXME: correct? */ + VIDEO_FONT_WIDTH * ( end - begin ), /* frame > width */ /* FIXME: correct? */ + VIDEO_FONT_HEIGHT, /* frame height > */ > + bgx /* fill color */ > + ); > +#else > + int i; > + if ( begin == 0 && end == CONSOLE_COLS ) > + memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line, /* offset of row */ > + CONSOLE_ROW_SIZE >> 2, /* length of row */ > + bgx /* fill color */ > + ); > + else > + for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i ) > + memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line + /* offset of row > */ + VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * begin + /* offset of col */ > + i * VIDEO_LINE_LEN, /* col offset of i-th line */ > + (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * ( end - begin + 1)) >> 2, /* > length to end of line */ + bgx /* fill color */ > + ); these lines are way too long -- notice how my e-mail client craps everywhere because of it ;). put the comments on their own line, move them all to before the func call, or drop them. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: