Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8840900ybi; Thu, 6 Jun 2019 21:48:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkzYSJ/0SihwKulLYenjahI45DVdzkCUsKwurVL66ndGgdhEDLyZnYFBNUa8fXx/QLFhMQ X-Received: by 2002:a62:29c7:: with SMTP id p190mr55943369pfp.218.1559882938531; Thu, 06 Jun 2019 21:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559882938; cv=none; d=google.com; s=arc-20160816; b=kngZMJvHagOV4axN21CLZYgd3EzKAuOhC8c+0aPboUrbEMj3MJwYLJUyiFpOTLOblw NOyJdl3WDddtOv9NOAV/eDNaSPEw5DWDbuTeJ+Dv55TYOUCz6oRCI6bEXeRqOMdtIi7r QH1WACFYpg4SQsXp62Fm+487WzLLu8LtXCJKgxF7EJ1G1RI9VZEt+coOu6U+fbyOpSxw z6plCC87Rhgu/bJ/sAXgtVUcDr0zVZlkNpUmnmVVOB+DjLxT6Mv0HFdNng2SnqYg+lfQ 8Kp0fu1tlHeC70V77YvzMu5wDHE8rCysrtcXGSBkmVgMb1EugS0La8FU1tGh2ro08vpi u12w== 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=ATu26WvvNPiJ9Ah/tmZWwxGXI/i8AcwKGoFEMQ2U0A4=; b=zaQ5EnXGuISM/m8hqNpR74gQOVgvqyB6ewP1aUrabEcefGnvoZB7Vcbvk5a1rW57ya Qs3mYyd3MtCZ6dGu5v60iEhPaiwhqge9qsMtjPQbOU7d/esbbtxXS3m+y+bs/6ymccq6 U5XHoZ/Cm5+wRIPAaUigb3hdFToek0VkLbU4hmyp0i4MTDzrcMBpdcNyen2FGsjVlI3a HqtCJnAs20gpY4j/rHlpA5HIz1Gu8o+dfOMJ8/53/Uqyf5ZJ6bpuz8XSJbGyIwlep/M3 h+WsZVfpyzHvuP8uYSYEzbU+CWx1Z8qw3Tx1pdn2lzqwerFtQTRevaONUsWvYaQplNXS R5hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qit71R6h; 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 d4si822279pfr.82.2019.06.06.21.48.30; Thu, 06 Jun 2019 21:48:58 -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=Qit71R6h; 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 S1726783AbfFGEqz (ORCPT + 99 others); Fri, 7 Jun 2019 00:46:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41865 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbfFGEqr (ORCPT ); Fri, 7 Jun 2019 00:46:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id q17so451973pfq.8 for ; Thu, 06 Jun 2019 21:46:47 -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=ATu26WvvNPiJ9Ah/tmZWwxGXI/i8AcwKGoFEMQ2U0A4=; b=Qit71R6hsjTt2C4V/Wmws+Xb8tajqL1zmFx25XZOZkLaLnybvYDuq2g3DOfwRErqu4 YUfs6BWhrZeulSYQPt0iTiYCnSiWyT0Q548h4FFds+OlzCOyu7ZaoK9GkfsLjKNomynO LIEGZ+rvvioEEtU2eqbUpTe8Ki6OMkD8VbIElvbUU6Lml4Xy9HW99/TL18ROZhaPf6Wm YownnNe5HLc+1BzuUy28y1uoOTzBUk+jxHZODcxx8fv/Iwv913Zp+PY9/v2QlHDHQoiE T5OwKc4trf32G6q3HsjgHFEeU6JEPWTLgVokIIm8xpEEbbacOTc3lEy+GhJ+6wEVLWr+ ZcWg== 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=ATu26WvvNPiJ9Ah/tmZWwxGXI/i8AcwKGoFEMQ2U0A4=; b=UYKSnR7bf21TIIZDnE8FoTIySUIN0FFd6eVumMAJGM7NkKTgAEEbc4xsCyLOQSL9Vr fRHfafwFgypXeLJDYEYBenqni5igxNTPZbYcYYbZbtqgnNrcf4O9MIJu0R1OWpSlaEL9 OSC5hJb7oQzD2aXsBAUEAemgdForMOJFbh6aP3UDN07pvif2QJp3B/OmPIEUvxasuJAv WWkoqPTHNJ1hEVAkVwKndw7Ma1BZ4mIhsdUE6zS9wnwlGnjJMRdcOzoKibpdyk5pizsQ efzNTr+J6xH/HUgr3yfk0iR78Ji9qNLlLt873qT+7fAuPGmPm5vgaXu2WcQaQqUYf1qW Qurw== X-Gm-Message-State: APjAAAW1fXt+dhSfPFl241QvLFmZbEUVOux4E/bHbKaFpMinrm1RVYPa gSfnJRWKuSChm3KgYAYKgX8= X-Received: by 2002:a17:90a:ba81:: with SMTP id t1mr3370811pjr.139.1559882806633; Thu, 06 Jun 2019 21:46:46 -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 o13sm919516pfh.23.2019.06.06.21.46.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 06 Jun 2019 21:46:45 -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 v4 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy() Date: Thu, 6 Jun 2019 21:45:48 -0700 Message-Id: <20190607044550.13361-14-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607044550.13361-1-andrew.smirnov@gmail.com> References: <20190607044550.13361-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 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 c994c72eb330..e747f10021e3 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