[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <644a375d-18b4-e2c7-0e2a-6eb1471b4d07@gmail.com>
Date: Mon, 18 Oct 2021 15:21:33 -0300
From: Igor Matheus Andrade Torrente <igormtorrente@...il.com>
To: Thomas Zimmermann <tzimmermann@...e.de>,
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 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@...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
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;
>>
>
Powered by blists - more mailing lists