lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87f347bf-801f-7fba-bb52-009367cd30a0@suse.de>
Date:   Mon, 18 Oct 2021 12:02:40 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Igor Matheus Andrade Torrente <igormtorrente@...il.com>,
        rodrigosiqueiramelo@...il.com, melissa.srw@...il.com
Cc:     hamohammed.sa@...il.com, daniel@...ll.ch, airlied@...ux.ie,
        contact@...rsion.fr, leandro.ribeiro@...labora.com,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        lkcamp@...ts.libreplanetbr.org
Subject: Re: [PATCH 1/6] drm: vkms: Replace the deprecated
 drm_mode_config_init

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@...il.com>
> ---
>   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

  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;
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ