From patchwork Tue Jul 21 12:06:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6834971 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 129839F6CE for ; Tue, 21 Jul 2015 12:07:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40CE920678 for ; Tue, 21 Jul 2015 12:07:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E3ED42064E for ; Tue, 21 Jul 2015 12:07:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEE456E920; Tue, 21 Jul 2015 05:07:01 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D7106E920; Tue, 21 Jul 2015 05:07:00 -0700 (PDT) Received: by pdbnt7 with SMTP id nt7so48935217pdb.0; Tue, 21 Jul 2015 05:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WTE/6ZVmnVV2Fzf/g+rfOgEHpu6m3lKGddIPqP+vDSY=; b=n9bjqd6/c9vzLnrvTHY8ET2FTP3aLOLcjrOcTigLgd6jmNWeAgep1EZnvjY8ChqJAb CAzRvXyIWS33kLkJAEULK9CP7VC/fu0SIZJJNSJtqaSOBfqwHZBDtDfUTYBIW1siV1S6 QiZ95oIXJlNYi7Ha9D4zmPvordAOxSiesGkVAh6P7S+tkaD0+z4LCtvly3LIg/lEHGZw YN73F52wkr5aDMd90UOGSPcgH82MgajlYM89IiVaq4NF3y+ZtYrvDxaiSTEtjKxhAOIx LAW7C657YGk0eLlWA6/Ua5mX/VNwgf44XkM4VqIkPxWs0HYV/pPqrntxzX6OtgySnFIW ZzAw== X-Received: by 10.70.136.129 with SMTP id qa1mr30918176pdb.81.1437480419789; Tue, 21 Jul 2015 05:06:59 -0700 (PDT) Received: from localhost.localdomain ([49.206.252.123]) by smtp.gmail.com with ESMTPSA id ht9sm27253200pdb.0.2015.07.21.05.06.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jul 2015 05:06:59 -0700 (PDT) From: Sudip Mukherjee To: Daniel Vetter , Jani Nikula , David Airlie Subject: [PATCH v3 2/2] drm/i915: remove redundant if check Date: Tue, 21 Jul 2015 17:36:46 +0530 Message-Id: <1437480406-19285-2-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1437480406-19285-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1437480406-19285-1-git-send-email-sudipm.mukherjee@gmail.com> Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sudip Mukherjee 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The extra check for connector_type is not required as we are already checking for connector_type != DRM_MODE_CONNECTOR_DisplayPort. The check was added by commit eb3394faeb97 ("drm/i915: Add debugfs test control files for Displayport compliance testing") Signed-off-by: Sudip Mukherjee --- v3: It is new. Submitting together in a series as the changes are in the same part of the code. drivers/gpu/drm/i915/i915_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index ffce62e..caf1382 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -4059,9 +4059,7 @@ static ssize_t i915_displayport_test_active_write(struct file *file, DRM_MODE_CONNECTOR_DisplayPort) continue; - if (connector->connector_type == - DRM_MODE_CONNECTOR_DisplayPort && - connector->status == connector_status_connected && + if (connector->status == connector_status_connected && connector->encoder != NULL) { intel_dp = enc_to_intel_dp(connector->encoder); status = kstrtoint(input_buffer, 10, &val);