From patchwork Fri Jul 15 20:00:06 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: 9232559 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 0B1A26075D for ; Fri, 15 Jul 2016 20:00:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE68526861 for ; Fri, 15 Jul 2016 20:00:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2E932715B; Fri, 15 Jul 2016 20:00:26 +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 45E2B26861 for ; Fri, 15 Jul 2016 20:00:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 91FB66EAD4; Fri, 15 Jul 2016 20:00:22 +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.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 554F06EAD4 for ; Fri, 15 Jul 2016 20:00:19 +0000 (UTC) Received: from [192.168.1.2] ([77.182.179.66]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0M2IuS-1b7ip62Glo-00s7BY; Fri, 15 Jul 2016 22:00:12 +0200 Subject: [PATCH] drm/arcpgu: Delete an unnecessary check before drm_fbdev_cma_hotplug_event() To: Alexey Brodkin , David Airlie , dri-devel@lists.freedesktop.org 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: Fri, 15 Jul 2016 22:00:06 +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:/vHMPj03K311rwF429nQ72x8kf70/kwCqTF4oIr7sW9Wb3RiTRG 2dYE1luC7twmiJLxHN/LqpoM/ovJ+s2rrBKF64nJkQs9J+Gebk6eJVCpsf7CStUCAxULyRy t2BdkysyYLgDY/FaIpCBqmRZlpNePMpuKQxLmZg36rzW60G7CXn4dnABlItoJvb9kYFVmeB FlaAHkwM0jVxe4ZVaBIxA== X-UI-Out-Filterresults: notjunk:1; V01:K0:GSWRe3xCSUs=:W3PWL92b6QKgxUbBXRsdw2 EEb88ju0bMmZFLWF4mCuY6wZQXMlA0CtyoUggY9aQvj5+XCvfNiYDAyWZj5aMFaeOEf5cYivB 82yEJgzdXDvns//WeMVXgQBg6UiAwNd/jtrv5EM/zdXf6y+Pdb6/KxK3E/FT0wwsJ4vkQtPZw W7sTWy3YTwOKMZXRtIu1cysuM5Nf7l1sfoeOzhK6PhJ8cT7KWIWmBpMibPwaIetHoCZiUa728 C9zbixHoWypQcP/Aq4zHh2hPCv9OhFn5FfhwnGFXegJ9JHGsXVIAFeV5/VkiIz9XEYyYaFSa5 J7rt/JgGSyXyQvYr9HL0Ohh+zyc6zK0+5WUzfcPJkYWArPsnpmKnc3wJNEl/nQoaK1VKnwsuy WE28EGZiKNJk6Hia7wIMzqjaBdwDGXIHLxZgtTEL8yW8OIHxu4JPwfHXdAzTfEBlSDqDsa/kk pfLhO2PLvR8LXW7tuxNxLSSFp/n7QPBb7OcHzmpnQ1RKBvdo0NZexi1bNIKVOwzZCjIZy0ill Ny/hbeqD1FtIHSyPCtsO6gg0r77fSx2q3k7dQNfETWAPGAvQBd8Ir6H49KOiZduJef4RNiE2U b0QXhXwJojtunG15BUPmoTSGd9KgJaf3tssYDXUfBe4AsIs2VLFF59A73Es6dRX+Kado1xilS ZyaUDspdRqqvRwFZwU1YU08YAvgV1/Lta7bPpmKPaPW118LpawDdcb9URZnVQDhSeCn1nMmfP f4NsWGF4pGx08jNXLJo75/wjyeG9k4behXlturgbBH9qkafDMf3qBLU/xTYGJ6gSwC6vJ8m7Z XgzIjvp 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: Fri, 15 Jul 2016 21:52: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: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index ccbdadb..740d8ba 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -28,8 +28,7 @@ static void arcpgu_fb_output_poll_changed(struct drm_device *dev) { struct arcpgu_drm_private *arcpgu = dev->dev_private; - if (arcpgu->fbdev) - drm_fbdev_cma_hotplug_event(arcpgu->fbdev); + drm_fbdev_cma_hotplug_event(arcpgu->fbdev); } static struct drm_mode_config_funcs arcpgu_drm_modecfg_funcs = {