Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1448028 > unrolled thread

[PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap"

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-07-21 19:50 +0200
Last post2016-07-21 20:10 +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.


Contents

  [PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the  function call "vunmap" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 19:50 +0200
    Re: [PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the  function call "vunmap" Sean Paul <seanpaul@chromium.org> - 2016-07-21 20:10 +0200

#1448028 — [PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap"

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-07-21 19:50 +0200
Subject[PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap"
Message-ID<rXqgF-2eV-7@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 21 Jul 2016 19:23:25 +0200

The vunmap() function performs also input parameter validation.
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/exynos/exynos_drm_fbdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index dd09117..4cfb39d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -269,8 +269,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
 	struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
 	struct drm_framebuffer *fb;
 
-	if (exynos_gem->kvaddr)
-		vunmap(exynos_gem->kvaddr);
+	vunmap(exynos_gem->kvaddr);
 
 	/* release drm framebuffer and real buffer */
 	if (fb_helper->fb && fb_helper->fb->funcs) {
-- 
2.9.2

[toc] | [next] | [standalone]


#1448033

FromSean Paul <seanpaul@chromium.org>
Date2016-07-21 20:10 +0200
Message-ID<rXqA1-2B6-9@gated-at.bofh.it>
In reply to#1448028
On Thu, Jul 21, 2016 at 1:42 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 21 Jul 2016 19:23:25 +0200
>
> The vunmap() function performs also input parameter validation.
> 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>

Applied to drm-misc

> ---
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index dd09117..4cfb39d 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -269,8 +269,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
>         struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
>         struct drm_framebuffer *fb;
>
> -       if (exynos_gem->kvaddr)
> -               vunmap(exynos_gem->kvaddr);
> +       vunmap(exynos_gem->kvaddr);
>
>         /* release drm framebuffer and real buffer */
>         if (fb_helper->fb && fb_helper->fb->funcs) {
> --
> 2.9.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web