Thread (16 messages) flat view 16 messages, 2 authors, 2007-10-16

Re: [patch 12/13] fb: Move and rename extern declaration for global_mode_option

From: Geert Uytterhoeven <hidden>
Date: 2007-10-16 07:18:34
Also in: linuxppc-dev

On Mon, 15 Oct 2007, Andrew Morton wrote:
On Fri, 12 Oct 2007 16:51:04 +0200
Geert Uytterhoeven [off-list ref] wrote:
quoted
-    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 <redacted>
---
 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:   Geert.Uytterhoeven@sonycom.com	
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help