Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp855153ybb; Fri, 3 Apr 2020 13:08:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJCjvJSFs9DeooklKWHI6zSKZhHUYF0U39tIZ7hmee+WaAwHIeprzJG/FPnKZ0jKbDoqfeP X-Received: by 2002:aca:6002:: with SMTP id u2mr4540599oib.45.1585944526895; Fri, 03 Apr 2020 13:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585944526; cv=none; d=google.com; s=arc-20160816; b=ooGsDvGl+CGwGnm0Yb4SJwnDT5VvqQ89a6z5NGj+Qm+/ob9eX8oBH9iXlJamg7jY0x DAQAO2OAsNMr0rT8j3ZaNZIGcomhNSuVs/mi1kA+Ih0OwrxQpsEsLtJDbjS0v5oKJU37 qvwoC3UfaGgXMqvwENbtPXTViC0ERODB4lQdZ1WyhsR99n6HK5uF+QtqR/42FLMuEMpR Eqx9Me7jetrAc9H8PT7UmM5GillklA0ADI6nqgPPXVm6bpWNQgpxzECV+mM5bm+k6EeU 00ISci/rXQUenMMp+q6V1mKdjNTpfGUmY/I4NNGZ8/z1trwtblQsd2cF9mfSLrlw7SPY h5Dg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p7uc0abaBqg3jPG1aiHeqKdJXYGxUjBqIactIjvdhvw=; b=QfLOHOy9GcklVBweVwILH80XUqUKlKV+82VXwOv0FDURMAtm+Zo/JUKE9I98uf3jQq r3e3BpsGQVT+5RBYBgZyW1jdlX6rFMGbywzV1rN1CGbguLT0hg6siUR97pJSASN8dey8 4rLVU8VkCl90hlvYPHRZcnzJx0t5GmV0VjKAo8/RyWczn4aAgc68hpQiriCv7uZwNzy9 QO/ugN2cKACYj+zW9CwsNpc52JBCvNaBNBbA59VciCs/QSwTI9E+XMJChHA/ttiBHPFD a9pBdPUNdvOjRn793XBtSkuFSd5oMtNz2WbwKl0VIbYKjA23vSsDkWL6BZyANVX55148 3Ulw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PMMrnf6D; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si4212471ote.308.2020.04.03.13.08.33; Fri, 03 Apr 2020 13:08:46 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PMMrnf6D; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727928AbgDCUIP (ORCPT + 99 others); Fri, 3 Apr 2020 16:08:15 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:42151 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbgDCUIO (ORCPT ); Fri, 3 Apr 2020 16:08:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585944493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p7uc0abaBqg3jPG1aiHeqKdJXYGxUjBqIactIjvdhvw=; b=PMMrnf6D+Tq5U9Bp3/eB9b5coy3aBw8wQbNT8FnblILsdo+kq3fi7FwVKNrb1IH3AitXye oBL5vxsfVpfdMqs5KVH4YcspaMOvf4BTOEte4x9XS1sBoOHif4ZsZyOGHWuX9FRMSPaIit QPBpPI9ksj2KnREM/h66Cvt64P0omnA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-3-nDPF8ENjP6myDwElzna6ag-1; Fri, 03 Apr 2020 16:08:11 -0400 X-MC-Unique: nDPF8ENjP6myDwElzna6ag-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8B9D801A00; Fri, 3 Apr 2020 20:08:09 +0000 (UTC) Received: from Ruby.redhat.com (ovpn-117-203.rdu2.redhat.com [10.10.117.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 916095C28F; Fri, 3 Apr 2020 20:08:06 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org Cc: Sean Paul , stable@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Airlie , Todd Previte , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] drm/dp_mst: Reformat drm_dp_check_act_status() a bit Date: Fri, 3 Apr 2020 16:07:54 -0400 Message-Id: <20200403200757.886443-3-lyude@redhat.com> In-Reply-To: <20200403200757.886443-1-lyude@redhat.com> References: <20200403200757.886443-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just add a bit more line wrapping, get rid of some extraneous whitespace, remove an unneeded goto label, and move around some variable declarations. No functional changes here. Signed-off-by: Lyude Paul [this isn't a fix, but it's needed for the fix that comes after this] Fixes: ad7f8a1f9ced ("drm/helper: add Displayport multi-stream helper (v0= .6)") Cc: Sean Paul Cc: # v3.17+ --- drivers/gpu/drm/drm_dp_mst_topology.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_= dp_mst_topology.c index 2b9ce965f044..7aaf184a2e5f 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -4473,33 +4473,31 @@ static int drm_dp_dpcd_write_payload(struct drm_d= p_mst_topology_mgr *mgr, */ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr) { + int count =3D 0, ret; u8 status; - int ret; - int count =3D 0; =20 do { - ret =3D drm_dp_dpcd_readb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &s= tatus); - + ret =3D drm_dp_dpcd_readb(mgr->aux, + DP_PAYLOAD_TABLE_UPDATE_STATUS, + &status); if (ret < 0) { - DRM_DEBUG_KMS("failed to read payload table status %d\n", ret); - goto fail; + DRM_DEBUG_KMS("failed to read payload table status %d\n", + ret); + return ret; } =20 if (status & DP_PAYLOAD_ACT_HANDLED) break; count++; udelay(100); - } while (count < 30); =20 if (!(status & DP_PAYLOAD_ACT_HANDLED)) { - DRM_DEBUG_KMS("failed to get ACT bit %d after %d retries\n", status, c= ount); - ret =3D -EINVAL; - goto fail; + DRM_DEBUG_KMS("failed to get ACT bit %d after %d retries\n", + status, count); + return -EINVAL; } return 0; -fail: - return ret; } EXPORT_SYMBOL(drm_dp_check_act_status); =20 --=20 2.25.1