On Mon, 15 Oct 2007, Andrew Morton wrote:
> On Fri, 12 Oct 2007 16:51:04 +0200
> Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> 
> > -    if (mode_option || (mode_option = global_mode_option)) {
> > +    if (mode_option || (mode_option = fb_mode_option)) {
> 
> I guess that equals-which-looks-like-it-should-be-equals-equals really
> is intended to be an assignment?
> 
> I guess.  After staring at it for a while.  It's a pretty obnoxious way
> of coding it, especially in kernel context where such things are unexpected...

Subject: fb modedb: Refactor confusing mode_option assignment

fb modedb: Refactor confusing mode_option assignment

Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
---
 drivers/video/modedb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -510,7 +510,9 @@ int fb_find_mode(struct fb_var_screeninf
        default_bpp = 8;
 
     /* Did the user specify a video mode? */
-    if (mode_option || (mode_option = fb_mode_option)) {
+    if (!mode_option)
+       mode_option = fb_mode_option;
+    if (mode_option) {
        const char *name = mode_option;
        unsigned int namelen = strlen(name);
        int res_specified = 0, bpp_specified = 0, refresh_specified = 0;

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453     
Fax:      +32 (0)2 700 8622     
E-mail:   [EMAIL PROTECTED]     
Internet: http://www.sony-europe.com/
        
Sony Network and Software Technology Center Europe      
A division of Sony Service Centre (Europe) N.V. 
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium      
VAT BE 0413.825.160 · RPR Brussels      
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to