From patchwork Sat Jul 16 07:20:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9233043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03E4D60574 for ; Sat, 16 Jul 2016 07:20:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1C5F25218 for ; Sat, 16 Jul 2016 07:20:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5EC325221; Sat, 16 Jul 2016 07:20:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7128F25218 for ; Sat, 16 Jul 2016 07:20:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8927B6E150; Sat, 16 Jul 2016 07:20:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0E7B6E150 for ; Sat, 16 Jul 2016 07:20:18 +0000 (UTC) Received: from [192.168.1.2] ([77.182.189.163]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MS29q-1bmyZe0wdG-00TE2Y; Sat, 16 Jul 2016 09:20:08 +0200 Subject: [PATCH] drm/hdlcd: Delete an unnecessary check before drm_fbdev_cma_hotplug_event() 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> To: dri-devel@lists.freedesktop.org, malidp@foss.arm.com, Liviu Dudau , David Airlie , Brian Starkey From: SF Markus Elfring Message-ID: Date: Sat, 16 Jul 2016 09:20:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <5317A59D.4@users.sourceforge.net> X-Provags-ID: V03:K0:b3imn08vvmQSXDFm2BObN3XW0fNGJ9D6xL827LkwMpuoPb9kM9l NxCTgdKYYfqWnCAb+9/BbyebpP0fJ4s6/RjAuBB02cqD9BtrMG9l/54h/uwjogOEViFuGwV 3JbonOzSUDPBpRqaOe/wM0x1ED4MWRr3Jj7nn95oI3OvkGO1ApYr7XiZFW+EYNu78sReNhh GbpEHW7GSPgg73iJQilnA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Kge4LC1zGko=:FSHMh/P8Db1kBY5xPrySQH dvbrSfJWlmNdfa/+TufOMAlk+DmcuKxU7chSw3AiN/wzZmzms7fw44KEDMXqqLt+MPgkfq+Bd mSLRuNx/7W6cdVu9hPlRPtWHMQIgDV4GD83Lju/9ybocz/ltHLA4KANIIB5hZDNCpL8kXXqR2 Zz4aMAdwF4qdxNDCK2SFgt9s6vAhm7xqLrlWoQdQSPlL3tKB2r7rUwzGMvzyCrse3ASnEfLzx gc6e4NQYAvXDJlkYQBC1O3mUSJrhQS/4Jd+WCqUGy+syDnbqbN4qHBXnESF0V9GYkA26LM/id UzhhAKGdKLq3DxLesqKPtIl9o7tikyUXPTSJ+vbrOdfIQrHVhWAtJ24Jnp6zbotPnwQ/4s23R irjTQ/nrlPYdy3cI7/4K2rZTbbfoPEVcHJYOgLzmu0YgxzOnjOceZbLIoeHEmhpIO0N7EoXlV O41iHzZusRHDfNnU8t10HBSkWFKEVEk/HgsbHtoKnww0BE34W3JaglOb+qa84FK/Usz6Cd+W8 9b/zCTDAWTHy0WxvAmC00oeL7anT0FaGf9ogo3zsbnnbyBCrvyvzlwy+Kc/Q/z58LCcI1a4Or jQqPC2eO5Etz5JcnivEVFguOwZAOhzNBCpLGtrleZA+kMrDn5mCwjxWJkw/XUn/6gAKbTRK8l tu3Glex+5A8dAfvULDGsZ1S5KAf+91+tPfJ1/+MVXYfxhBRy7f4YfcS1V5pxlDjv+7z9DEYnv 4POi/A5aFmtYTEXDQvUd903CWL68Hhhl/ILN6LQrLiWkfE4kDl8pnPy/1D1/sf3YLbqg5ch6L R1A2wtt Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 16 Jul 2016 09:10:40 +0200 The drm_fbdev_cma_hotplug_event() 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 Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/hdlcd_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 28b8cd1..9b1aefe 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -102,8 +102,7 @@ static void hdlcd_fb_output_poll_changed(struct drm_device *drm) { struct hdlcd_drm_private *hdlcd = drm->dev_private; - if (hdlcd->fbdev) - drm_fbdev_cma_hotplug_event(hdlcd->fbdev); + drm_fbdev_cma_hotplug_event(hdlcd->fbdev); } static const struct drm_mode_config_funcs hdlcd_mode_config_funcs = {