[PATCH 1/3] drm/fbdev: Include <linux/vmalloc.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Include <linux/vmalloc.h> in fbdev emulation to get vzalloc() and
vfree() on MIPS. The error messages are shown below and bug reports
are at [1] and [2].

  drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_cleanup':
  drivers/gpu/drm/drm_fbdev_generic.c:63:17: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     63 |                 vfree(shadow);
        |                 ^~~~~
        |                 kvfree
  drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_fb_probe':
  drivers/gpu/drm/drm_fbdev_generic.c:219:38: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
    219 |                 fbi->screen_buffer = vzalloc(fbi->screen_size);
        |                                      ^~~~~~~
        |                                      kvzalloc
  drivers/gpu/drm/drm_fbdev_generic.c:219:36: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    219 |                 fbi->screen_buffer = vzalloc(fbi->screen_size);

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
Fixes: 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file")
Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
Cc: Javier Martinez Canillas <javierm@xxxxxxxxxx>
Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
Cc: Maxime Ripard <mripard@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Link: https://lore.kernel.org/dri-devel/202211060911.5U76gMtE-lkp@xxxxxxxxx/T/#u # [1]
Link: https://lore.kernel.org/dri-devel/202211060331.1SoD1tAR-lkp@xxxxxxxxx/T/#u # [2]
---
 drivers/gpu/drm/drm_fbdev_generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index 2d6083ad2e3c7..ab86956692795 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: MIT
 
 #include <linux/moduleparam.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_drv.h>
-- 
2.38.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux