Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5457507ybl; Tue, 10 Dec 2019 06:24:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzXXlqBIWf1ETz73Ugazv9grYbEzLsfgLB+x1JpiZUEA2mKs6tMo5brG5IiN215RA7mx9zL X-Received: by 2002:a9d:4d8a:: with SMTP id u10mr10990768otk.232.1575987884256; Tue, 10 Dec 2019 06:24:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575987884; cv=none; d=google.com; s=arc-20160816; b=GFRv5Yy+7ifZw1uFpka3F0prBw7FlEaoGYuFIch0/nwTWByeND16lSSFuR4JSFcwNX GWnH7qO4Xo9qQ7O80kmE0BYXMH1htUT0cn7PCKl5fA7XiHCawFuURM5qywnbdimsjv7K DbNv/mPqa77JiSb+CXg32DFG1VL2JdR4qFhNJs/FlzkpTJssXxxdaeBsDst89kZu2el+ ES5T3DY9ILZnYekj411Y5gDLtH0ErgPjoqP57yFGXZc1EkNAQ6rDJKSoD2Hf+T8k6DbH L4lLCzXEfpIlNHEm9I5QPs8BUg/PGPQiokDwZCK0eWlMFMj7wggIz2SyU22T+aD+iPD2 zixw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ORIiGg2vRrkhmfV3WnEO1fXdCEsgmo3nDrgZmshltrk=; b=DLaOnfycNSrk/xMBri1XyNjmJN2f+AdqYrjLjT4PLmRb3n3aQYJLzchrLY3qMwb17k 7MNdb44S5q75ZE+LVZ3RplFQgIRsrvSl6MNnVXb2dnOchLTlPi8k8Mk6N8/WykuN2z1H P21GQzGsEzRzxgSClP1QwaZCB99EM6kn8TOIJPrJVnbCQGfIA/juQVulcF0sp+YuG1p+ kYryeXwAhbyJlJQ2kCndgS0gh6kwMl6YZLmGw3QoE5slKdOHvcPIsmkNEP/6C9Nj04q/ /GqkuZ78vo8n/tqZYKlq86xGa1JoshylFaD6OocbrIStNvEB1uA64HgBqcdWXvPwD0qG fhcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si1805102otq.37.2019.12.10.06.24.30; Tue, 10 Dec 2019 06:24:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727500AbfLJOX7 (ORCPT + 99 others); Tue, 10 Dec 2019 09:23:59 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58973 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727345AbfLJOX5 (ORCPT ); Tue, 10 Dec 2019 09:23:57 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iegQY-0001G5-IY; Tue, 10 Dec 2019 14:23:50 +0000 From: Colin King To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/i915: remove redundant checks for a null fb pointer Date: Tue, 10 Dec 2019 14:23:49 +0000 Message-Id: <20191210142349.333171-1-colin.king@canonical.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King A prior check and return when pointer fb is null makes subsequent null checks on fb redundant. Remove the redundant null checks. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 062e5bef637a..a48478be6e8f 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2600,8 +2600,8 @@ static void intel_plane_hw_info(struct seq_file *m, struct intel_plane *plane) plane_state->hw.rotation); seq_printf(m, "\t\thw: fb=%d,%s,%dx%d, visible=%s, src=" DRM_RECT_FP_FMT ", dst=" DRM_RECT_FMT ", rotation=%s\n", - fb ? fb->base.id : 0, fb ? format_name.str : "n/a", - fb ? fb->width : 0, fb ? fb->height : 0, + fb->base.id, format_name.str, + fb->width, fb->height, yesno(plane_state->uapi.visible), DRM_RECT_FP_ARG(&plane_state->uapi.src), DRM_RECT_ARG(&plane_state->uapi.dst), -- 2.24.0