linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DRM: gpu: radeon: Fixed coding style issues
@ 2021-08-04 11:20 Sergio Miguéns Iglesias
  2021-08-05 12:33 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Sergio Miguéns Iglesias @ 2021-08-04 11:20 UTC (permalink / raw)
  To: airlied
  Cc: daniel, alexander.deucher, christian.koenig, Xinhui.Pan, amd-gfx,
	linux-kernel, Sergio Miguéns Iglesias

Fixed braces, an unnecessary if statement and added a missing space.

Signed-off-by: Sergio Miguéns Iglesias <sergio@lony.xyz>
---
 drivers/gpu/drm/radeon/radeon_fb.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 0b206b052972..6640b7c947fe 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -54,6 +54,7 @@ radeonfb_open(struct fb_info *info, int user)
 	struct radeon_fbdev *rfbdev = info->par;
 	struct radeon_device *rdev = rfbdev->rdev;
 	int ret = pm_runtime_get_sync(rdev->ddev->dev);
+
 	if (ret < 0 && ret != -EACCES) {
 		pm_runtime_mark_last_busy(rdev->ddev->dev);
 		pm_runtime_put_autosuspend(rdev->ddev->dev);
@@ -196,9 +197,8 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
 		radeon_bo_check_tiling(rbo, 0, 0);
 	ret = radeon_bo_kmap(rbo, NULL);
 	radeon_bo_unreserve(rbo);
-	if (ret) {
+	if (ret)
 		goto out_unref;
-	}
 
 	*gobj_p = gobj;
 	return 0;
@@ -294,9 +294,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 	return 0;
 
 out:
-	if (rbo) {
-
-	}
 	if (fb && ret) {
 		drm_gem_object_put(gobj);
 		drm_framebuffer_unregister_private(fb);
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] DRM: gpu: radeon: Fixed coding style issues
  2021-08-04 11:20 [PATCH] DRM: gpu: radeon: Fixed coding style issues Sergio Miguéns Iglesias
@ 2021-08-05 12:33 ` Christian König
  2021-08-05 19:40   ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2021-08-05 12:33 UTC (permalink / raw)
  To: Sergio Miguéns Iglesias, airlied
  Cc: daniel, alexander.deucher, christian.koenig, Xinhui.Pan, amd-gfx,
	linux-kernel, Sergio Miguéns Iglesias

Am 04.08.21 um 13:20 schrieb Sergio Miguéns Iglesias:
> Fixed braces, an unnecessary if statement and added a missing space.
>
> Signed-off-by: Sergio Miguéns Iglesias <sergio@lony.xyz>

Normally we see patches which just fixes coding style as unnecessary 
churn, but the "if (rbo) {}" is really ugly here.

So Reviewed-by: Christian König <christian.koenig@amd.com>.

Thanks,
Christian.

> ---
>   drivers/gpu/drm/radeon/radeon_fb.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index 0b206b052972..6640b7c947fe 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -54,6 +54,7 @@ radeonfb_open(struct fb_info *info, int user)
>   	struct radeon_fbdev *rfbdev = info->par;
>   	struct radeon_device *rdev = rfbdev->rdev;
>   	int ret = pm_runtime_get_sync(rdev->ddev->dev);
> +
>   	if (ret < 0 && ret != -EACCES) {
>   		pm_runtime_mark_last_busy(rdev->ddev->dev);
>   		pm_runtime_put_autosuspend(rdev->ddev->dev);
> @@ -196,9 +197,8 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
>   		radeon_bo_check_tiling(rbo, 0, 0);
>   	ret = radeon_bo_kmap(rbo, NULL);
>   	radeon_bo_unreserve(rbo);
> -	if (ret) {
> +	if (ret)
>   		goto out_unref;
> -	}
>   
>   	*gobj_p = gobj;
>   	return 0;
> @@ -294,9 +294,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
>   	return 0;
>   
>   out:
> -	if (rbo) {
> -
> -	}
>   	if (fb && ret) {
>   		drm_gem_object_put(gobj);
>   		drm_framebuffer_unregister_private(fb);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] DRM: gpu: radeon: Fixed coding style issues
  2021-08-05 12:33 ` Christian König
@ 2021-08-05 19:40   ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2021-08-05 19:40 UTC (permalink / raw)
  To: Christian König
  Cc: Sergio Miguéns Iglesias, Dave Airlie, Daniel Vetter,
	Deucher, Alexander, Christian Koenig, xinhui pan, amd-gfx list,
	LKML, Sergio Miguéns Iglesias

Applied.  Thanks!

Alex

On Thu, Aug 5, 2021 at 8:33 AM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> Am 04.08.21 um 13:20 schrieb Sergio Miguéns Iglesias:
> > Fixed braces, an unnecessary if statement and added a missing space.
> >
> > Signed-off-by: Sergio Miguéns Iglesias <sergio@lony.xyz>
>
> Normally we see patches which just fixes coding style as unnecessary
> churn, but the "if (rbo) {}" is really ugly here.
>
> So Reviewed-by: Christian König <christian.koenig@amd.com>.
>
> Thanks,
> Christian.
>
> > ---
> >   drivers/gpu/drm/radeon/radeon_fb.c | 7 ++-----
> >   1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> > index 0b206b052972..6640b7c947fe 100644
> > --- a/drivers/gpu/drm/radeon/radeon_fb.c
> > +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> > @@ -54,6 +54,7 @@ radeonfb_open(struct fb_info *info, int user)
> >       struct radeon_fbdev *rfbdev = info->par;
> >       struct radeon_device *rdev = rfbdev->rdev;
> >       int ret = pm_runtime_get_sync(rdev->ddev->dev);
> > +
> >       if (ret < 0 && ret != -EACCES) {
> >               pm_runtime_mark_last_busy(rdev->ddev->dev);
> >               pm_runtime_put_autosuspend(rdev->ddev->dev);
> > @@ -196,9 +197,8 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
> >               radeon_bo_check_tiling(rbo, 0, 0);
> >       ret = radeon_bo_kmap(rbo, NULL);
> >       radeon_bo_unreserve(rbo);
> > -     if (ret) {
> > +     if (ret)
> >               goto out_unref;
> > -     }
> >
> >       *gobj_p = gobj;
> >       return 0;
> > @@ -294,9 +294,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
> >       return 0;
> >
> >   out:
> > -     if (rbo) {
> > -
> > -     }
> >       if (fb && ret) {
> >               drm_gem_object_put(gobj);
> >               drm_framebuffer_unregister_private(fb);
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-05 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 11:20 [PATCH] DRM: gpu: radeon: Fixed coding style issues Sergio Miguéns Iglesias
2021-08-05 12:33 ` Christian König
2021-08-05 19:40   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).