linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 13/16] riva/fbdev: fix several -Wuninitialized
       [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de>
@ 2012-01-30 22:00 ` Danny Kukawka
  2012-02-13 21:26   ` Florian Tobias Schandinat
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Kukawka @ 2012-01-30 22:00 UTC (permalink / raw)
  To: Antonino Daplas; +Cc: Florian Tobias Schandinat, linux-fbdev, linux-kernel

Fix several -Wuninitialized compiler warnings by changing the
order of getting modedb in riva_update_default_var() to set
first the fallback and then the prefered timing.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
 drivers/video/riva/fbdev.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 2f58cf9..90df1a6 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
 			     specs->modedb, specs->modedb_len,
 			     NULL, 8);
 	} else if (specs->modedb != NULL) {
+		/* get first mode in database as fallback */
+		modedb = specs->modedb[0];
 		/* get preferred timing */
 		if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
 			int i;
@@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
 					break;
 				}
 			}
-		} else {
-			/* otherwise, get first mode in database */
-			modedb = specs->modedb[0];
 		}
 		var->bits_per_pixel = 8;
 		riva_update_var(var, &modedb);
-- 
1.7.7.3


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

* Re: [PATCH 13/16] riva/fbdev: fix several -Wuninitialized
  2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
@ 2012-02-13 21:26   ` Florian Tobias Schandinat
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2012-02-13 21:26 UTC (permalink / raw)
  To: Danny Kukawka; +Cc: Antonino Daplas, linux-fbdev, linux-kernel

On 01/30/2012 10:00 PM, Danny Kukawka wrote:
> Fix several -Wuninitialized compiler warnings by changing the
> order of getting modedb in riva_update_default_var() to set
> first the fallback and then the prefered timing.
> 
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/riva/fbdev.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
> index 2f58cf9..90df1a6 100644
> --- a/drivers/video/riva/fbdev.c
> +++ b/drivers/video/riva/fbdev.c
> @@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
>  			     specs->modedb, specs->modedb_len,
>  			     NULL, 8);
>  	} else if (specs->modedb != NULL) {
> +		/* get first mode in database as fallback */
> +		modedb = specs->modedb[0];
>  		/* get preferred timing */
>  		if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
>  			int i;
> @@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
>  					break;
>  				}
>  			}
> -		} else {
> -			/* otherwise, get first mode in database */
> -			modedb = specs->modedb[0];
>  		}
>  		var->bits_per_pixel = 8;
>  		riva_update_var(var, &modedb);


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

end of thread, other threads:[~2012-02-13 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1327960820-11867-1-git-send-email-danny.kukawka@bisect.de>
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
2012-02-13 21:26   ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).