Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5407308ybi; Wed, 12 Jun 2019 01:55:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNxnKHL0fdq8aOi42Scf9/xfr0cIIUwvS7oVC2d6J7/F4Cdc/v3hpm+lMtTjCjOE6DFAnB X-Received: by 2002:a17:90a:9b8a:: with SMTP id g10mr23391262pjp.66.1560329714428; Wed, 12 Jun 2019 01:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560329714; cv=none; d=google.com; s=arc-20160816; b=sw5PS+q2eO6cHLKbcpCcf/3DnVjnD1yqm9VexWFDqhtgDAXdappyRSdFZN3j8aHgYu HuHU3tTi0zvaxhqG0LB9BWdGuTWMtRCQ/2cjIWYgZaIE9xUxh2fHG09fU3yDgb8MIna7 fhVD5YEW4C1jNwOsgNTfWLW6Iu1kMOrGFNbRQ9B9CHt75GXRwX5VlHljkfjq3bc8Q5o7 h2a/umGNltw2q2GCd8gwqaVSVFTtB5Sy6qXYucMZFmapNCpLkwHNdZmiFZrZViPtBJo9 750OlKEVkiid346iSaqw2MqzGyipDEQ+JZ3NNYB+YPyUhAfWpGXA/O/vEc2PYxe/0Q2Z mRkw== 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=ww6brkr59ulFad1KL7LWJRPTHM4vzJU/q/AyY2cW8Es=; b=u80ucrjxKbztjKZjcfsbAiU2uR3XoFX0hOSet2T7EIOQp2i5m8EXZ0YVsL6Vm4xcz6 FeFWs2LnBmUa/kD2Sa3dfS7ccyXvDZ8EXY4JvNI02jbFtcnoJBvyd6eCCKhelIWTVzaN 5WdFjCSG7Db8rc9zPMgpzRIJupBiH127+7dhAg9Yc/ZBrjo/BZWMFGrsL+BHES54pFny BsjmIc2hvS1iQFHlhuZxHAOTG+2U7IoroFPHbdcwjT06ZgbyT9QzxWq0hW7proFkE2Ak QE0RTvynG0snTCx3yzopZUNdmoJq/m3JyQL4CGRMGBVqY2B+S5Th1gZjM926LokNpKho xaFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nW+E4KDz; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b40si15786394plb.426.2019.06.12.01.55.00; Wed, 12 Jun 2019 01:55:14 -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=@gmail.com header.s=20161025 header.b=nW+E4KDz; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408697AbfFLIdm (ORCPT + 99 others); Wed, 12 Jun 2019 04:33:42 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38377 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408650AbfFLId0 (ORCPT ); Wed, 12 Jun 2019 04:33:26 -0400 Received: by mail-pf1-f195.google.com with SMTP id a186so9220440pfa.5 for ; Wed, 12 Jun 2019 01:33:26 -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 :mime-version:content-transfer-encoding; bh=ww6brkr59ulFad1KL7LWJRPTHM4vzJU/q/AyY2cW8Es=; b=nW+E4KDzpmgWAUJ0Tpc6bOnHwrdWhmDOOQ0VZRQktRWGal0aB80LNVmsUJ8rixGYBf J42Qgvq1YrTh+vt47FXanyjj4cREHnqIgyCLpDUKRJ6NsReiH/Dwio1JGu0ErqIicQLm EaThXafTHKYS1bqZlSqJCJRRJ66+p3xB9Z1kHHsf5WhUhkzMhzxmCiFrM/CX5jZiTmZT dUFUmQEm2akdXAArBrV8XCemHKKV37Vg25pMl1aI9Dx2fpTjdFtD0lTieSLCvLUSGZ1J 88EaQK0IKTCoOZ9dB+gsHEV8Nt38oBZRNek1VmLFL4KusxMcjUFGEPNdP+QFRd+F98cg Ledg== 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:mime-version:content-transfer-encoding; bh=ww6brkr59ulFad1KL7LWJRPTHM4vzJU/q/AyY2cW8Es=; b=BOhXYjtDHEEhJnZUn4IUQVktEC8JwVfhu3ADlMWgO+PSk4d+o2d2plGI6QU6cMIIFj 1MBYdEl78V/NyuRj9iOxvea2irk3qwQwoZmioETKmvh6D2g3eAv/RRTPADXLfocavr8+ LXlazakREML+Eir/HGIur2aGW3IrbRXGFITqkUKTnY1C9BRzkisUeD+V+Apm46Hm6wbb 9cM/0PuqYyhK8WQPBRgt152TQkLEHhI+f4tF2Rvx7/y9Z/lQuAf67tB+bEQ/eh4xvhMz AbxCrpHOWVD1SUJ9uQ69pwAiDRjZ6md8XwTwED5T2VI81jt3hYcIKHhqL3IX99oh7Axb b/4Q== X-Gm-Message-State: APjAAAVUSIBAp1RsWtkrysb3Ivz0Kci9yjCxgSGcEajgK3kqEdtxf2IB /Orwuk+2H7aaO4GjQE2qLqE= X-Received: by 2002:a17:90a:8a10:: with SMTP id w16mr31528113pjn.133.1560328405864; Wed, 12 Jun 2019 01:33:25 -0700 (PDT) Received: from localhost.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id d21sm18845991pfr.162.2019.06.12.01.33.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 01:33:25 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Cc: Andrey Smirnov , Andrzej Hajda , Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v5 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy() Date: Wed, 12 Jun 2019 01:32:50 -0700 Message-Id: <20190612083252.15321-14-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190612083252.15321-1-andrew.smirnov@gmail.com> References: <20190612083252.15321-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We never pass anything but 100 as timeout_ms to tc_aux_wait_busy(), so we may as well hardcode that value and simplify function's signature. Signed-off-by: Andrey Smirnov Reviewed-by: Andrzej Hajda Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 28df53f7c349..01ca92a6d9c8 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -294,10 +294,9 @@ static inline int tc_poll_timeout(struct tc_data *tc, unsigned int addr, sleep_us, timeout_us); } -static int tc_aux_wait_busy(struct tc_data *tc, unsigned int timeout_ms) +static int tc_aux_wait_busy(struct tc_data *tc) { - return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, - 1000, 1000 * timeout_ms); + return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, 1000, 100000); } static int tc_aux_write_data(struct tc_data *tc, const void *data, @@ -350,7 +349,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, u32 auxstatus; int ret; - ret = tc_aux_wait_busy(tc, 100); + ret = tc_aux_wait_busy(tc); if (ret) return ret; @@ -377,7 +376,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, if (ret) return ret; - ret = tc_aux_wait_busy(tc, 100); + ret = tc_aux_wait_busy(tc); if (ret) return ret; -- 2.21.0