[PATCH] Re: [CHECKER] 2.4.5-ac4 non-init functions calling init functions

From: Petr Vandrovec (vandrove@vc.cvut.cz)
Date: Wed May 30 2001 - 18:08:55 EST


On Wed, May 30, 2001 at 01:08:40PM -0700, Dawson Engler wrote:
> /u2/engler/mc/oses/linux/2.4.5-ac4/drivers/video/matrox/matroxfb_base.c
> :1785:initMatrox2: ERROR:INIT: non-init fn 'initMatrox2' calling init
> fn 'fb_find_mode'

Thanks for pointing this out. Code checks for init/noninit phase, but I somehow
forgot to set hotplug variable:

#ifndef MODULE
        /* mode database is marked __init!!! */
        if (!hotplug) {
                fb_find_mode(&vesafb_defined, &ACCESS_FBINFO(fbcon), videomode[0]?videomode:NULL,
                        NULL, 0, &defaultmode, vesafb_defined.bits_per_pixel);
        }
#endif /* !MODULE */

Alan, please apply following patch, it fixes this. It is for 2.4.5-ac5,
but should apply to any 2.4.x.
                                                Thanks,
                                                        Petr Vandrovec
                                                        vandrove@vc.cvut.cz

diff -urdN linux/drivers/video/matrox/matroxfb_base.c linux/drivers/video/matrox/matroxfb_base.c
--- linux/drivers/video/matrox/matroxfb_base.c Wed May 30 20:27:28 2001
+++ linux/drivers/video/matrox/matroxfb_base.c Wed May 30 20:31:42 2001
@@ -2495,6 +2495,7 @@
                 initialized = 1;
                 matrox_init();
         }
+ hotplug = 1;
         /* never return failure, user can hotplug matrox later... */
         return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 31 2001 - 21:00:49 EST