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: 9239969 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 0BA676077C for ; Wed, 20 Jul 2016 16:43:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED98526A4D for ; Wed, 20 Jul 2016 16:43:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF3CE27CCB; Wed, 20 Jul 2016 16:43:28 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7378626A4D for ; Wed, 20 Jul 2016 16:43:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPuZ5-0004CQ-ET; Wed, 20 Jul 2016 16:41:43 +0000 Received: from mout.web.de ([217.72.192.78]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPuZ1-0004AB-G4 for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2016 16:41:40 +0000 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/ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160720_094139_924444_11DEDEF3 X-CRM114-Status: GOOD ( 10.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 = {