[2/4] fbdev: Nuke FBINFO_MODULE
diff mbox

Message ID 20170706125735.28299-3-daniel.vetter@ffwll.ch
State New
Headers show

Commit Message

Daniel Vetter July 6, 2017, 12:57 p.m. UTC
Instead check info->ops->owner, which amounts to the same.

Spotted because I want to remove the pile of broken and cargo-culted
fb_info->flags assignments in drm drivers.

Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 drivers/video/fbdev/core/fbmem.c | 4 ++--
 include/linux/fb.h               | 7 +------
 3 files changed, 4 insertions(+), 9 deletions(-)

Comments

kbuild test robot July 7, 2017, 11:21 p.m. UTC | #1
Hi Daniel,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12 next-20170707]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/fbcon-Make-fbcon-a-built-time-depency-for-fbdev/20170708-063020
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

   In file included from drivers/video/fbdev/matrox/matroxfb_base.h:35:0,
                    from drivers/video/fbdev/matrox/matroxfb_base.c:104:
   drivers/video/fbdev/matrox/matroxfb_base.c: In function 'initMatrox2':
>> include/linux/fb.h:538:28: error: 'FBINFO_MODULE' undeclared (first use in this function)
    #define FBINFO_FLAG_MODULE FBINFO_MODULE
                               ^
>> drivers/video/fbdev/matrox/matroxfb_base.c:1798:33: note: in expansion of macro 'FBINFO_FLAG_MODULE'
     minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
                                    ^~~~~~~~~~~~~~~~~~
   include/linux/fb.h:538:28: note: each undeclared identifier is reported only once for each function it appears in
    #define FBINFO_FLAG_MODULE FBINFO_MODULE
                               ^
>> drivers/video/fbdev/matrox/matroxfb_base.c:1798:33: note: in expansion of macro 'FBINFO_FLAG_MODULE'
     minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
                                    ^~~~~~~~~~~~~~~~~~
--
   In file included from drivers/video//fbdev/matrox/matroxfb_base.h:35:0,
                    from drivers/video//fbdev/matrox/matroxfb_base.c:104:
   drivers/video//fbdev/matrox/matroxfb_base.c: In function 'initMatrox2':
>> include/linux/fb.h:538:28: error: 'FBINFO_MODULE' undeclared (first use in this function)
    #define FBINFO_FLAG_MODULE FBINFO_MODULE
                               ^
   drivers/video//fbdev/matrox/matroxfb_base.c:1798:33: note: in expansion of macro 'FBINFO_FLAG_MODULE'
     minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
                                    ^~~~~~~~~~~~~~~~~~
   include/linux/fb.h:538:28: note: each undeclared identifier is reported only once for each function it appears in
    #define FBINFO_FLAG_MODULE FBINFO_MODULE
                               ^
   drivers/video//fbdev/matrox/matroxfb_base.c:1798:33: note: in expansion of macro 'FBINFO_FLAG_MODULE'
     minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
                                    ^~~~~~~~~~~~~~~~~~

vim +/FBINFO_MODULE +538 include/linux/fb.h

1471ca9a Marcin Slusarz 2010-05-16  532  	a->count = max_num;
1471ca9a Marcin Slusarz 2010-05-16  533  	return a;
1471ca9a Marcin Slusarz 2010-05-16  534  }
1471ca9a Marcin Slusarz 2010-05-16  535  
^1da177e Linus Torvalds 2005-04-16  536  
^1da177e Linus Torvalds 2005-04-16  537  // This will go away
^1da177e Linus Torvalds 2005-04-16 @538  #define FBINFO_FLAG_MODULE	FBINFO_MODULE
^1da177e Linus Torvalds 2005-04-16  539  #define FBINFO_FLAG_DEFAULT	FBINFO_DEFAULT
^1da177e Linus Torvalds 2005-04-16  540  
^1da177e Linus Torvalds 2005-04-16  541  /* This will go away

:::::: The code at line 538 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Patch
diff mbox

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 86b3bcbd01a8..431a1533a2fe 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -564,7 +564,7 @@  static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
 	unsigned short *save = NULL, *r, *q;
 	int logo_height;
 
-	if (info->flags & FBINFO_MODULE) {
+	if (info->fbops->owner) {
 		logo_shown = FBCON_LOGO_DONTSHOW;
 		return;
 	}
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 283d57cf8526..2636f192e8c9 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -463,7 +463,7 @@  static int fb_show_logo_line(struct fb_info *info, int rotate,
 
 	/* Return if the frame buffer is not mapped or suspended */
 	if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
-	    info->flags & FBINFO_MODULE)
+	    info->fbops->owner)
 		return 0;
 
 	image.depth = 8;
@@ -601,7 +601,7 @@  int fb_prepare_logo(struct fb_info *info, int rotate)
 	memset(&fb_logo, 0, sizeof(struct logo_data));
 
 	if (info->flags & FBINFO_MISC_TILEBLITTING ||
-	    info->flags & FBINFO_MODULE)
+	    info->fbops->owner)
 		return 0;
 
 	if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
diff --git a/include/linux/fb.h b/include/linux/fb.h
index a964d076b4dc..40b767fa622f 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -400,7 +400,7 @@  struct fb_tile_ops {
 #endif /* CONFIG_FB_TILEBLITTING */
 
 /* FBINFO_* = fb_info.flags bit flags */
-#define FBINFO_MODULE		0x0001	/* Low-level driver is a module */
+#define FBINFO_DEFAULT		0
 #define FBINFO_HWACCEL_DISABLED	0x0002
 	/* When FBINFO_HWACCEL_DISABLED is set:
 	 *  Hardware acceleration is turned off.  Software implementations
@@ -533,11 +533,6 @@  static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
 	return a;
 }
 
-#ifdef MODULE
-#define FBINFO_DEFAULT	FBINFO_MODULE
-#else
-#define FBINFO_DEFAULT	0
-#endif
 
 // This will go away
 #define FBINFO_FLAG_MODULE	FBINFO_MODULE