Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444771 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-07-16 10:10 +0200 |
| Last post | 2016-07-18 09:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] drm/ast: Delete an unnecessary check before drm_gem_object_unreference_unlocked() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-16 10:10 +0200
Re: [PATCH] drm/ast: Delete an unnecessary check before drm_gem_object_unreference_unlocked() Daniel Vetter <daniel@ffwll.ch> - 2016-07-18 09:00 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-07-16 10:10 +0200 |
| Subject | [PATCH] drm/ast: Delete an unnecessary check before drm_gem_object_unreference_unlocked() |
| Message-ID | <rVsPE-1kd-11@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Jul 2016 09:54:22 +0200
The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/ast/ast_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 7bc3aa6..904beaa 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -295,9 +295,8 @@ static int ast_get_dram_info(struct drm_device *dev)
static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb);
- if (ast_fb->obj)
- drm_gem_object_unreference_unlocked(ast_fb->obj);
+ drm_gem_object_unreference_unlocked(ast_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(fb);
}
--
2.9.1
[toc] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2016-07-18 09:00 +0200 |
| Message-ID | <rWaGZ-2Mp-7@gated-at.bofh.it> |
| In reply to | #1444771 |
On Sat, Jul 16, 2016 at 10:04:34AM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 16 Jul 2016 09:54:22 +0200
>
> The drm_gem_object_unreference_unlocked() function tests whether
> its argument is NULL and then returns immediately.
> Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Ok, I merged all the non-amd ones from your latest round to drm-misc. Two
small nitpicks:
- for cocci patches I prefer if you include the (simplified, if it's a
large one) semantic patch in the commit message. Cocci is really badly
documented, it's good to see new examples of how.
- threading seems funny in your series. Please generate mail threads using
git format-patch --cover-letter $sha1_range and send them out using git
send-email. That'll get all the details right. Also pls don't reply with
new patches to an old series, that hides the patches and confuses the
discussion. Just start a new thread (even when the patches are on the
same or similar topic).
Thanks, Daniel
> ---
> drivers/gpu/drm/ast/ast_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
> index 7bc3aa6..904beaa 100644
> --- a/drivers/gpu/drm/ast/ast_main.c
> +++ b/drivers/gpu/drm/ast/ast_main.c
> @@ -295,9 +295,8 @@ static int ast_get_dram_info(struct drm_device *dev)
> static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb)
> {
> struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb);
> - if (ast_fb->obj)
> - drm_gem_object_unreference_unlocked(ast_fb->obj);
>
> + drm_gem_object_unreference_unlocked(ast_fb->obj);
> drm_framebuffer_cleanup(fb);
> kfree(fb);
> }
> --
> 2.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web