Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp284586img; Thu, 21 Mar 2019 20:31:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzzuXv7C4AExu8WzrpzfkZ/IZZJVNCYEuHHjebyrJsLYRpQDmefSUvLIY8j9LUwgKf04oz X-Received: by 2002:a17:902:121:: with SMTP id 30mr7243200plb.315.1553225467696; Thu, 21 Mar 2019 20:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553225467; cv=none; d=google.com; s=arc-20160816; b=e3YScXC8LrD8/KSoIKt1+G8cUWZjJcG7NwudyJd9KRw8i4FDOK08wsVSfv0RBNgPIb CDMCy/pxcSB6tFqAuZOgsj9JpiwLn2536w18mzwwbPHxlrM3pv5bxcnX3hPhtoM3rT94 gukqvxje5yhvxbOyJ++z1wFiI9plLUXHc0I/oIwOytdKrN6LN5ywit86Rd6ftSC77WKC rqewxQqniXvN0cS460MnBv6GO1Iudrx66Jghq0fihCGQJOm1xAmbjGXNTGZf65zDT/o+ hagEZXmdPOwzFTfZZqoHOMR1oWyzOOeFB4zBYAPaQXDiG/A9b4HgmCvh3SLWvnU/icPq z0jg== 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=1SpLWn2GNZxw8TpsUtWTa95KkSKBcIOU+P/XIiFsSiI=; b=N1uZsO8f08sAyMsoXDoUv8SD7/asddCA2xXJ7yQSzozJMb9rKANF5SOjaNHh1CBP7L jU3WD+6vLCderDLVPPhEetFvKccIOIzXiXw9kMJJl11OSCe2tl2q/jpQ4Hzu1NPpoWKn /CP4zQQQ57BZebHUtEaw2yOs9WXK5yAiO1dTSmTKun5k1iEDNJVJruEA/2K4CyW41RXW JZD4rzoPY7OFnBv9Wd0hgG6xx1r0VO87o2swEdSR+aJCoNtaX9dh7m2HeDmzhzSY8l3/ EeA5MkC3o/vfgi/oK1rUatZHwuZKLQuNpHFksB4ioLhMkVF1i6Pn9d5QD+7L7xf/p8hG EIag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ExBJCigH; 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 l32si3165278pgm.130.2019.03.21.20.30.50; Thu, 21 Mar 2019 20:31:07 -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=ExBJCigH; 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 S1727797AbfCVD3t (ORCPT + 99 others); Thu, 21 Mar 2019 23:29:49 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41032 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727744AbfCVD3d (ORCPT ); Thu, 21 Mar 2019 23:29:33 -0400 Received: by mail-pg1-f195.google.com with SMTP id k11so490366pgb.8 for ; Thu, 21 Mar 2019 20:29:33 -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=1SpLWn2GNZxw8TpsUtWTa95KkSKBcIOU+P/XIiFsSiI=; b=ExBJCigHEwuSNm8pFYe5VfRDt3bPfhu1chj0ZBLPO7EvUOwWM0hKSzvPggK8vO7irL vKLPf4b/aFg346Os1URvrw556chW+wPGtsrG/U2ELc8Z0fKA5sopu4uwMRqdH+pSOgP0 ZIbyRzMtSv18l4cHrbMfTu42mYN65RB20wMSSLht38RbRcaTLW/DQlXOT6jtyUVOlpit w0WDnrKfEwEn/n7KBCrhEA2/qS9RlfAawXsVgFaluIa1mYYWuduq++3qu665+LkH+44v k1ltbSzxg9id4vrhzvXZ3oolD52ZPIGIf4OiYmTx43R5QJUCuFLB0ncTOYjwf4aWHD9B JfoA== 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=1SpLWn2GNZxw8TpsUtWTa95KkSKBcIOU+P/XIiFsSiI=; b=WyfcYLdW8fBcduWMLDYh/vicpCtM4w8GqHYG9Yrlc4YbOLJ5SVSlx5/frzczexZCj7 PLLv9QHwbNTZgxMPQ76J1J9lIVNLRqXjIfkU2RAUH+9Q6gjgGKNLEyHFYEqtdzjHYvPr Sr2blMI+e3sfkpymX/RRaeVuthlex/UDztjCXyvzLK1z2xBtX3JdY/ZNYQIt5Tq2Q4il R68QzuLdiaE5GBAIe8nHY2pCjHnXwTxPoIK4nuLjyuM1HRcIcx9L5PNLrLC2BGvz5Ae2 FTl0Dy5pHe5PG2JsJAojSlBiLoEAoDHikAJYUzGO769K1sF/A1Ddr4BZgRQ3eCGeVLMd ejAQ== X-Gm-Message-State: APjAAAU8UTbuVBMUSaXieM9ICkxdtV/PhVBli/YGFph6LCKyBl4Nv7RO S/hYcxzu8NeDD/DoWzdgFs0= X-Received: by 2002:a63:d5f:: with SMTP id 31mr6692027pgn.274.1553225372709; Thu, 21 Mar 2019 20:29:32 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o76sm16154476pfa.156.2019.03.21.20.29.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 20:29:32 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Cc: Andrey Smirnov , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v2 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy() Date: Thu, 21 Mar 2019 20:28:59 -0700 Message-Id: <20190322032901.12045-14-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322032901.12045-1-andrew.smirnov@gmail.com> References: <20190322032901.12045-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: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel 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 f66a1c4a2047..07d568761463 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -280,10 +280,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, @@ -354,7 +353,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; @@ -381,7 +380,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.20.1