Skip to contentSkip to conversation

Bug in warning message from MTRR rework in uvesafb

PATCH New Torsten Kaiser 5 participants 5 messages Jul 10, 2013 – Jul 12, 2013 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

Commit 63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75, "uvesafb: Clean up MTRR code" contains the following change:

@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options)

         }
     }

+ if (mtrr != 3 && mtrr != 1)
+ pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is
unsupported", mtrr);
+

     return 0;

}
#endif /* !MODULE */

Shouldn't this be && mtrr != 0?

HTH, Torsten

#1 lore raw
Quoted 15 lines · Torsten Kaiser

Commit 63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75, "uvesafb: Clean up MTRR code" contains the following change:

(quoted diff) +3 -0
@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options)
         }
     }
 
+    if (mtrr != 3 && mtrr != 1)
+        pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is
 unsupported", mtrr);
+
     return 0;
 }

#endif /* !MODULE */

Quoted 1 line

Shouldn't this be && mtrr != 0?

Indeed, and Sylvain Hitier (cc'd) sent a patch (off-list) that must have gotten lost somewhere.

--Andy

#2 lore raw
Quoted 17 lines · Andy Lutomirski
Quoted 15 lines · Torsten Kaiser

Commit 63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75, "uvesafb: Clean up MTRR code" contains the following change:

(quoted diff) +3 -0
@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options)
         }
     }
 
+    if (mtrr != 3 && mtrr != 1)
+        pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is
 unsupported", mtrr);
+
     return 0;
 }

#endif /* !MODULE */

Quoted 5 lines
Quoted 1 line

Shouldn't this be && mtrr != 0?

Indeed, and Sylvain Hitier (cc'd) sent a patch (off-list) that must have gotten lost somewhere.

Yeah I should get an email reply thing for off-list stuff, as its even more likely I'll lose it.

Dave.

#3 lore raw

PATCH 1/1 uvesafb: Really allow mtrr being 0, as documented and warn()ed

In reply to Andy Lutomirski

Hello,

When: 2013-07-10_3@10-36-22 -0700
Who:  Andy Lutomirski

What:

Quoted 17 lines
Quoted 15 lines · Torsten Kaiser

Commit 63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75, "uvesafb: Clean up MTRR code" contains the following change:

(quoted diff) +3 -0
@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options)
         }
     }
 
+    if (mtrr != 3 && mtrr != 1)
+        pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is
 unsupported", mtrr);
+
     return 0;
 }

#endif /* !MODULE */

Quoted 4 lines
Quoted 1 line

Shouldn't this be && mtrr != 0?

Indeed, and Sylvain Hitier (cc'd) sent a patch (off-list) that must have gotten lost somewhere.

RIP patch born on 2013-06-08_6@23-02-26 +0200 ...

May your soul be happy, because here is a clone of you who will hopefully fulfill your quest:

Fixup for commit "uvesafb: Clean up MTRR code"

    (63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75)
---
 drivers/video/uvesafb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/uvesafb.c +1 -1
index 296279b..2121fc3 100644
@@ -1891,7 +1891,7 @@ static int uvesafb_setup(char *options)
                }
        }
 
-       if (mtrr != 3 && mtrr != 1)
+       if (mtrr != 3 && mtrr != 0)
                pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is unsupported", mtrr);
 
        return 0;

--

Regards,
Sylvain "ythier" Hitier

Signature · 3 lines
Business is about being busy, not being rich...
Lived 777 days in a Debian package => http://en.wikipedia.org/wiki/Apt,_Vaucluse
There's THE room for ideals in this mechanical place!
#4 lore raw
In reply to Torsten Kaiser
Quoted 15 lines · Torsten Kaiser

Commit 63e28a7a5ffce59b645ca9cbcc01e1e8be56bd75, "uvesafb: Clean up MTRR code" contains the following change:

(quoted diff) +3 -0
@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options)
         }
     }
 
+    if (mtrr != 3 && mtrr != 1)
+        pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is
 unsupported", mtrr);
+
     return 0;
 }

#endif /* !MODULE */

Quoted 1 line

Shouldn't this be && mtrr != 0?

Yes, you're right, I've failed to spot that while reviewing. Can you please submit a proper kernel patch, see Documentation/SubmittingPatches?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch