| Submitter | Anatolij Gustschin |
|---|---|
| Date | Dec. 7, 2011, 1:58 p.m. |
| Message ID | <1323266290-31142-1-git-send-email-agust@denx.de> |
| Download | mbox | patch |
| Permalink | /patch/129968/ |
| State | Accepted |
| Headers | show |
Comments
Dear Anatolij Gustschin, In message <1323266290-31142-1-git-send-email-agust@denx.de> you wrote: > Fix: > cfb_console.c:371: warning: 'cursor_state' defined but not used > cfb_console.c:372: warning: 'old_col' defined but not used > cfb_console.c:373: warning: 'old_row' defined but not used > cfb_console.c:435: warning: 'video_invertchar' defined but not used > > Signed-off-by: Anatolij Gustschin <agust@denx.de> > --- > I forgot to run MAKEALL for both, arm and powerpc for last CFB > patch, sorry. > > drivers/video/cfb_console.c | 38 +++++++++++++++++--------------------- > 1 files changed, 17 insertions(+), 21 deletions(-) Indeed, this fixes the build warnings. Thanks. Tested-by: Wolfgang Denk <wd@denx.de> [If it's OK with you, I will pull this direcxtly.] Best regards, Wolfgang Denk
Hello Wolfgang, On Wed, 07 Dec 2011 21:32:33 +0100 Wolfgang Denk <wd@denx.de> wrote: ... > > drivers/video/cfb_console.c | 38 +++++++++++++++++--------------------- > > 1 files changed, 17 insertions(+), 21 deletions(-) > > Indeed, this fixes the build warnings. Thanks. > > Tested-by: Wolfgang Denk <wd@denx.de> > > [If it's OK with you, I will pull this direcxtly.] Yes, it is OK. Thanks, Anatolij
Dear Anatolij Gustschin, In message <1323266290-31142-1-git-send-email-agust@denx.de> you wrote: > Fix: > cfb_console.c:371: warning: 'cursor_state' defined but not used > cfb_console.c:372: warning: 'old_col' defined but not used > cfb_console.c:373: warning: 'old_row' defined but not used > cfb_console.c:435: warning: 'video_invertchar' defined but not used > > Signed-off-by: Anatolij Gustschin <agust@denx.de> > --- > I forgot to run MAKEALL for both, arm and powerpc for last CFB > patch, sorry. > > drivers/video/cfb_console.c | 38 +++++++++++++++++--------------------- > 1 files changed, 17 insertions(+), 21 deletions(-) Applied, thanks. Best regards, Wolfgang Denk
Patch
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 9be6166..904caf7 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -368,9 +368,9 @@ static void *video_console_address; /* console buffer start address */ static int video_logo_height = VIDEO_LOGO_HEIGHT; -static int cursor_state; -static int old_col; -static int old_row; +static int __maybe_unused cursor_state; +static int __maybe_unused old_col; +static int __maybe_unused old_row; static int console_col; /* cursor col */ static int console_row; /* cursor row */ @@ -430,23 +430,6 @@ static const int video_font_draw_table32[16][4] = { {0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff} }; - -static void video_invertchar(int xx, int yy) -{ - int firstx = xx * VIDEO_PIXEL_SIZE; - int lastx = (xx + VIDEO_FONT_WIDTH) * VIDEO_PIXEL_SIZE; - int firsty = yy * VIDEO_LINE_LEN; - int lasty = (yy + VIDEO_FONT_HEIGHT) * VIDEO_LINE_LEN; - int x, y; - for (y = firsty; y < lasty; y += VIDEO_LINE_LEN) { - for (x = firstx; x < lastx; x++) { - u8 *dest = (u8 *)(video_fb_address) + x + y; - *dest = ~*dest; - } - } -} - - static void video_drawchars(int xx, int yy, unsigned char *s, int count) { u8 *cdat, *dest, *dest0; @@ -627,7 +610,20 @@ static void video_set_cursor(void) console_cursor(1); } - +static void video_invertchar(int xx, int yy) +{ + int firstx = xx * VIDEO_PIXEL_SIZE; + int lastx = (xx + VIDEO_FONT_WIDTH) * VIDEO_PIXEL_SIZE; + int firsty = yy * VIDEO_LINE_LEN; + int lasty = (yy + VIDEO_FONT_HEIGHT) * VIDEO_LINE_LEN; + int x, y; + for (y = firsty; y < lasty; y += VIDEO_LINE_LEN) { + for (x = firstx; x < lastx; x++) { + u8 *dest = (u8 *)(video_fb_address) + x + y; + *dest = ~*dest; + } + } +} void console_cursor(int state) {
Fix: cfb_console.c:371: warning: 'cursor_state' defined but not used cfb_console.c:372: warning: 'old_col' defined but not used cfb_console.c:373: warning: 'old_row' defined but not used cfb_console.c:435: warning: 'video_invertchar' defined but not used Signed-off-by: Anatolij Gustschin <agust@denx.de> --- I forgot to run MAKEALL for both, arm and powerpc for last CFB patch, sorry. drivers/video/cfb_console.c | 38 +++++++++++++++++--------------------- 1 files changed, 17 insertions(+), 21 deletions(-)