Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448534 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-07-22 13:00 +0200 |
| Last post | 2016-07-25 10:50 +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] GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-22 13:00 +0200
Re: [PATCH] GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob() Matthias Brugger <matthias.bgg@gmail.com> - 2016-07-25 10:50 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-07-22 13:00 +0200 |
| Subject | [PATCH] GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob() |
| Message-ID | <rXGlr-4Jg-5@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 22 Jul 2016 12:48:12 +0200
The drm_property_unreference_blob() 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/mediatek/mtk_drm_crtc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 24aa3ba..07541d0 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -112,9 +112,7 @@ static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
struct mtk_crtc_state *state;
if (crtc->state) {
- if (crtc->state->mode_blob)
- drm_property_unreference_blob(crtc->state->mode_blob);
-
+ drm_property_unreference_blob(crtc->state->mode_blob);
state = to_mtk_crtc_state(crtc->state);
memset(state, 0, sizeof(*state));
} else {
--
2.9.2
[toc] | [next] | [standalone]
| From | Matthias Brugger <matthias.bgg@gmail.com> |
|---|---|
| Date | 2016-07-25 10:50 +0200 |
| Message-ID | <rYJKi-2nt-11@gated-at.bofh.it> |
| In reply to | #1448534 |
On 22/07/16 12:56, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 22 Jul 2016 12:48:12 +0200
>
> The drm_property_unreference_blob() 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/mediatek/mtk_drm_crtc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index 24aa3ba..07541d0 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -112,9 +112,7 @@ static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
> struct mtk_crtc_state *state;
>
> if (crtc->state) {
> - if (crtc->state->mode_blob)
> - drm_property_unreference_blob(crtc->state->mode_blob);
> -
> + drm_property_unreference_blob(crtc->state->mode_blob);
> state = to_mtk_crtc_state(crtc->state);
> memset(state, 0, sizeof(*state));
> } else {
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web