Message ID | 20211122194400.30836-2-igormtorrente@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add new formats support to vkms | expand |
Hi Igor, just some nits on the commit message. On Mon, Nov 22, 2021 at 04:43:52PM -0300, Igor Torrente wrote: > The `drm_mode_config_init` was deprecated since c3b790e commit, and it's When referring to other commits, it's best to write it as 'commit <12-digit-SHA> ("description")' [1]. Also, imperative mood works best, so my suggestion would be: `drm_mode_config_init` is deprecated since commit c3b790ea07a1 ("drm: Manage drm_mode_config_init with drmm_") in favor of `drmm_mode_config_init`. Update the former to the latter. Thanks, Nícolas [1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes > being replaced by the `drmm_mode_config_init`. > > Signed-off-by: Igor Torrente <igormtorrente@gmail.com> > --- > V2: Change the code style(Thomas Zimmermann). > --- > drivers/gpu/drm/vkms/vkms_drv.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c > index 0ffe5f0e33f7..ee4d96dabe19 100644 > --- a/drivers/gpu/drm/vkms/vkms_drv.c > +++ b/drivers/gpu/drm/vkms/vkms_drv.c > @@ -140,8 +140,12 @@ 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; > + > + ret = drmm_mode_config_init(dev); > + if (ret < 0) > + 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; > -- > 2.30.2 >
Hi Nícolas, On Thu, Nov 25, 2021 at 1:37 AM Nícolas F. R. A. Prado <n@nfraprado.net> wrote: > > Hi Igor, > > just some nits on the commit message. > > On Mon, Nov 22, 2021 at 04:43:52PM -0300, Igor Torrente wrote: > > The `drm_mode_config_init` was deprecated since c3b790e commit, and it's > > When referring to other commits, it's best to write it as 'commit <12-digit-SHA> > ("description")' [1]. Also, imperative mood works best, so my suggestion would > be: > > `drm_mode_config_init` is deprecated since commit c3b790ea07a1 ("drm: Manage > drm_mode_config_init with drmm_") in favor of `drmm_mode_config_init`. Update > the former to the latter. Looks better indeed. I will change it to V4. Thanks! > > Thanks, > Nícolas > > [1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes > > > being replaced by the `drmm_mode_config_init`. > > > > Signed-off-by: Igor Torrente <igormtorrente@gmail.com> > > --- > > V2: Change the code style(Thomas Zimmermann). > > --- > > drivers/gpu/drm/vkms/vkms_drv.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c > > index 0ffe5f0e33f7..ee4d96dabe19 100644 > > --- a/drivers/gpu/drm/vkms/vkms_drv.c > > +++ b/drivers/gpu/drm/vkms/vkms_drv.c > > @@ -140,8 +140,12 @@ 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; > > + > > + ret = drmm_mode_config_init(dev); > > + if (ret < 0) > > + 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; > > -- > > 2.30.2 > >
diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 0ffe5f0e33f7..ee4d96dabe19 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -140,8 +140,12 @@ 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; + + ret = drmm_mode_config_init(dev); + if (ret < 0) + 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;
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 Torrente <igormtorrente@gmail.com> --- V2: Change the code style(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)