Re: [PATCH 1/6] drm: vkms: Replace the deprecated drm_mode_config_init

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

 



Hi Thomas,

On 10/18/21 7:02 AM, Thomas Zimmermann wrote:
Hi

Am 05.10.21 um 22:16 schrieb Igor Matheus Andrade Torrente:
The `drm_mode_config_init` was deprecated since c3b790e commit, and it's
being replaced by the `drmm_mode_config_init`.

Signed-off-by: Igor Matheus Andrade Torrente <igormtorrente@xxxxxxxxx>
---
  drivers/gpu/drm/vkms/vkms_drv.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
index 0ffe5f0e33f7..828868920494 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.c
+++ b/drivers/gpu/drm/vkms/vkms_drv.c
@@ -140,8 +140,11 @@ static const struct drm_mode_config_helper_funcs vkms_mode_config_helpers = {
  static int vkms_modeset_init(struct vkms_device *vkmsdev)
  {
      struct drm_device *dev = &vkmsdev->drm;
+    int ret = drmm_mode_config_init(dev);
+
+    if (ret < 0)
+        return ret;

The style looks awkward IMHO. Rather use
I don't think it's awkward. But I don't mind change it anyway.


  int ret

  ret = drmm_mode_config_init()
  if (ret)
     return ret;

-    drm_mode_config_init(dev);
      dev->mode_config.funcs = &vkms_mode_funcs;
      dev->mode_config.min_width = XRES_MIN;
      dev->mode_config.min_height = YRES_MIN;





[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