Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753945AbbF0RSD (ORCPT ); Sat, 27 Jun 2015 13:18:03 -0400 Received: from mout.web.de ([212.227.15.4]:55139 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbbF0RRy (ORCPT ); Sat, 27 Jun 2015 13:17:54 -0400 Message-ID: <558EDAAF.30803@users.sourceforge.net> Date: Sat, 27 Jun 2015 19:17:35 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Airlie , Inki Dae , Jingoo Han , Kukjin Kim , Kyungmin Park , Seung-Woo Kim , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org CC: Joonyoung Shim , Julia Lawall , kernel-janitors@vger.kernel.org, LKML Subject: Re: [PATCH] GPU-DRM-Exynos: Delete unnecessary checks before two function calls References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <54D28870.3060400@users.sourceforge.net> <54D329D0.7050006@samsung.com> In-Reply-To: <54D329D0.7050006@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ew+5ym/zGK/RxFSXyyu438BUk2PYxTqbHVWxaVoToFaScHrwc56 io1AMjN/BxpfcCvIypbakYfNs+hGKJrQPjQA1nNx+JrhTiMfcV0qgr26gp3uDuSsj7LbMx/ Rt96kXHWBZCP1gYXkUjoBPsFXgrSivHFqCwqNjILaplUPrgDKSDQvjmvvQT9JQBCwZL058p gtqmKWY4N7UmyyOFUs2ig== X-UI-Out-Filterresults: notjunk:1;V01:K0:J6Ux2IrxXW4=:aSD5bIaswiyuaMxC74cK9z FTe6oVSgUya0KEz9Dxt4Hj4+rFU4zhyjzr89rADFTPBDmmJJA3yM/LfhW8HNTsp+vKvc4ECtw 0HPgWKQwbeQKjIuzPp2eG24jakBYQfV00AJKori3PQPG3PGwMLdkedmR7iRu+M1/z/fWKCtru wLFm7qv0FSfXVPGOx/w8Ii/B5gf6Gza9eLITeHYuUjczk2JvS8zO/AvhuKvu7aeJ+fKMb8ITa T1yWkxdcT7aBn2vvk2eos3/lfkyA4aegKp+Z5TqfwenHPz/Ec/G2z+T0LWVdoM08d/A93qQ56 4aLZAyAX766NKlMr64CWEn3FGvgC4z4zRYcXAQXiOc52f4+E5eV0FEqetLzWrWDY7OKHZwvdI BiXUGq89VwicLNHbF0hDl4CVJYXu1li2J1dves5XJjuUujntvqfHWso8cDPmcHux+Vq8RN3UL te9NVxe47nAa2GVg8lHOL7SAj6kn6djXXy+yI7AUlhwqESVdh2Y4hloQDAcxnMRWkNtdG2Rrw OcwOFuTui+NK35m70P53BLQ8Wzux+rQ6UzdfD1iNyaGPJdHyxR6DNK0o2EeTzzgpPsblgtSP3 SuIK4OVZ0FAqYP5w/xgcaMeNZbT28hGS5VqcOd3jbPacGHEWxeM4payJkcblXoJiLYqGptbZJ nKbyW0wExxHdKedn5PFHEacdTeLGE0VgzISuZAbOHuzXZld7oecGMB35vDhcydxMJdgQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2327 Lines: 62 >> From: Markus Elfring >> Date: Wed, 4 Feb 2015 21:54:45 +0100 >> >> The functions phy_power_on() and vunmap() perform also input >> parameter validation. Thus the test around their calls is not needed. >> >> This issue was detected by using the Coccinelle software. >> >> Signed-off-by: Markus Elfring >> --- >> drivers/gpu/drm/exynos/exynos_dp_core.c | 6 ++---- >> drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- >> 2 files changed, 3 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c >> index 34d46aa..306cf1d 100644 >> --- a/drivers/gpu/drm/exynos/exynos_dp_core.c >> +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c >> @@ -1057,14 +1057,12 @@ static int exynos_dp_create_connector(struct exynos_drm_display *display, >> >> static void exynos_dp_phy_init(struct exynos_dp_device *dp) >> { >> - if (dp->phy) >> - phy_power_on(dp->phy); >> + phy_power_on(dp->phy); >> } >> >> static void exynos_dp_phy_exit(struct exynos_dp_device *dp) >> { >> - if (dp->phy) >> - phy_power_off(dp->phy); >> + phy_power_off(dp->phy); >> } >> >> static void exynos_dp_poweron(struct exynos_drm_display *display) >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c >> index e12ea90..0dd448a 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c >> @@ -313,7 +313,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev, >> struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj; >> struct drm_framebuffer *fb; >> >> - if (is_drm_iommu_supported(dev) && exynos_gem_obj->buffer->kvaddr) >> + if (is_drm_iommu_supported(dev)) >> vunmap(exynos_gem_obj->buffer->kvaddr); >> >> /* release drm framebuffer and real buffer */ >> > > Acked-by: Joonyoung Shim Do the chances increase to integrate this update suggestion into another source code repository? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/