From patchwork Wed Jul 20 16:40:49 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: 9239965 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 AF9C46077C for ; Wed, 20 Jul 2016 16:41:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A067726A4D for ; Wed, 20 Jul 2016 16:41:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94A7127CCB; Wed, 20 Jul 2016 16:41:22 +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 3B44726A4D for ; Wed, 20 Jul 2016 16:41:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A55D66E089; Wed, 20 Jul 2016 16:41:13 +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 [217.72.192.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75E3A6E089 for ; Wed, 20 Jul 2016 16:41:10 +0000 (UTC) Received: from [192.168.1.2] ([77.181.180.179]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0LxweO-1bKKUz3dxc-015KCt; Wed, 20 Jul 2016 18:40:54 +0200 Subject: [PATCH] GPU-DRM-sun4i: Delete an unnecessary check before drm_fbdev_cma_hotplug_event() To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Chen-Yu Tsai , Daniel Vetter , David Airlie , Maxime Ripard 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> From: SF Markus Elfring Message-ID: Date: Wed, 20 Jul 2016 18:40:49 +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:SvEnp5HqUCnlnqjo4r1dvjV3RmouFCSD8fwMKGPHRZbUlOrs8Qi 6ZvbbzZQXbQbYYyTnqnu/uGGh2JVwTApS+gVMRXGTdTTk3DjonlKoBDVyC2+9ML5S/79J9V ZLYqKOuRbgmNYCYAPts5+RYUPvkLJagOZh3eqhzVjnwek/wUHFfp9uycYJa5Mw33ynaYGtY o1+MLpH/N04VxY/wC4pCw== X-UI-Out-Filterresults: notjunk:1; V01:K0:DRTycg7il9w=:Nkp/qc38oSpByXIdTyNOKa 5x2faMT2yfxYHKz7nl1/SXQu2jrMapg0G0IqnYnKxu21ckBeLaQDwZtTcL5BUIdYsFCldMNZN xR5bICk8/BJh0PUyP26lXLS2+l25TKAu7ygV2ThgzQJ5qEJuYkDeiRiMs2Y60zX8Pc2Y7Q3E0 fwpr1SLGRR9e9wjq6ex8Jyurh7yILgQMJl0wIwGHavdb4l7eWNR44v2n2ee/zXg2xaJsAdTSO 8ky6Fa5pyjbNqfwmglFEvzBdennSv1oj59fZWOyBm0SdlwjT9F8ArBNscKvMLjIYWJlrmB0JU BXc+4pdohYwkL3ka5C+GpJzuLPu8+rotWye9Q7pnoIBePFGpBtPKrry9xcX0r7amlSxs/y6UN J7TWKMwtR1g6hnHG9Ie3YPv60a36itCG98b9Acdkw9Xzos9rnJwqBVrOC+XQvwLCtTqTyxgru CRTL8vSCp1PQ4Qgkf2DhxNNOzKBbA5fKrBMQNoO9ERI7QeBe1sTWFMMpItdhu1bWqMivXlq9w oLzdoWlFXKMgscuSeF6V7MTNskfciuCZV08SEba3Y5oKDbM20BU5P0bn7e8r37RTMNCoTyPor dpICPw2xQnYNhH00wZYGsBJpurS/VgZTRPiXObgP2Z5/9Kn6l9/yJAtFFLxJu7vltAEmt1RRk DQecS7bc8qfhLqWmGGC9pSEzsM+wy3lEXHd4d0EvD8nsLSEV/MX05b8zuiDeLYXWG8uh2b7f5 +sZBumN9UCEFMy1oV0GwOc7gF58toPQRXwsO1nTQe+6NAWQqbf0HosXfWqn0aSyvIa7aG3qld zCsv+J/ 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: Wed, 20 Jul 2016 18:32:34 +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 --- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index a0b30c2..70688fe 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c @@ -20,8 +20,7 @@ static void sun4i_de_output_poll_changed(struct drm_device *drm) { struct sun4i_drv *drv = drm->dev_private; - if (drv->fbdev) - drm_fbdev_cma_hotplug_event(drv->fbdev); + drm_fbdev_cma_hotplug_event(drv->fbdev); } static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {