From patchwork Wed Mar 29 14:44:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9651739 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 AA7BA602BE for ; Wed, 29 Mar 2017 14:44:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A092B284CE for ; Wed, 29 Mar 2017 14:44:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95894284D0; Wed, 29 Mar 2017 14:44:46 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6BEAA205FC for ; Wed, 29 Mar 2017 14:44:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DC316E76D; Wed, 29 Mar 2017 14:44:21 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 131296E765; Wed, 29 Mar 2017 14:44:18 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id w43so3621682wrb.1; Wed, 29 Mar 2017 07:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ftP7dp1Bk6bRtlZRkanchs8m86Zku3hZRGRvOec+0f8=; b=W3JZHDn6jlDdlETU+97ZyhzC9Ns2HS3zorFQ1Mh0OjeW1lLiwUuGXzq59xGDWdRftD i/KqjONPiTzZtUWoUEGyxjFfbmXAeiQnSGI/iWyRpzibvCyOFroeqjQI6AJgzXu6bLhu QUTzbMJ9B/C6d9StPFDHJfLaETqzcxWbg/jjVSuJ7yJQkL62aK5dpSonoSc5cyWQKzx6 DanOz/y0bopsNKcrCSaE+3FlPT4rA393jQwUOJCHxQaZ9fa0flIq2zNYY+kJs5Voh9L8 UjhX4MFrAe3BIcFM7Bx9JN4Plaa5cy24vY/mEc1Fs3LbnyY65u53Te6oKFsBuIzZeD1B BUDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ftP7dp1Bk6bRtlZRkanchs8m86Zku3hZRGRvOec+0f8=; b=JurYhK1nZd72CFo9HOka0aqlO9hSIKUscvZghgCR1HNT89i//qHNYuMBYJaXkH2UTe kEe+i0hCn370vMt4zDgXDYMm/gVL0puM7SAjLxKa9/yNPVEZZQylzWX7edcubSIYP1oe Fa1KUzpurV+lAYnsivR2np4nUcjdSSeiss4mpq9Xn3VM4IG27SpT3hD3+uARqgYsv6V0 +BgkJyZcZiL+2c1VVFpBWmBEu91h1tS8/SRIMgbTN/DacoOzCXBRvywKHSIniTQnVTiK E/yaBMNS+qKWhY4N9qaurUQLyZq/aAzvbdGWIdrPVD1supykv0dVLN0B/F1Ws6YxhBB6 dTKg== X-Gm-Message-State: AFeK/H2hWTuTLDC3ur/zk53F25IgXX1c1uX1HqF3mHj8yOdGw5++R8Lc3cQW/d2tqmujVw== X-Received: by 10.28.232.13 with SMTP id f13mr1064609wmh.141.1490798656636; Wed, 29 Mar 2017 07:44:16 -0700 (PDT) Received: from localhost (port-5852.pppoe.wtnet.de. [84.46.22.242]) by smtp.gmail.com with ESMTPSA id q72sm9648104wrb.54.2017.03.29.07.44.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Mar 2017 07:44:16 -0700 (PDT) From: Thierry Reding To: Daniel Vetter Date: Wed, 29 Mar 2017 16:44:01 +0200 Message-Id: <20170329144401.1804-12-thierry.reding@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170329144401.1804-1-thierry.reding@gmail.com> References: <20170329144401.1804-1-thierry.reding@gmail.com> Cc: John Stultz , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v4 11/11] drm/rockchip: Remove unnecessary NULL check X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The expression &private->fbdev_helper can never be NULL, so the check is completely unnecessary. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c index 81f9548672b0..df6bceabeca8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c @@ -168,10 +168,8 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, static void rockchip_drm_output_poll_changed(struct drm_device *dev) { struct rockchip_drm_private *private = dev->dev_private; - struct drm_fb_helper *fb_helper = &private->fbdev_helper; - if (fb_helper) - drm_fb_helper_hotplug_event(fb_helper); + drm_fb_helper_hotplug_event(&private->fbdev_helper); } static void