Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6400822ybi; Wed, 5 Jun 2019 00:07:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiuDqtR4euwFnFpKFMwkAkBHdWXl0/M5X0YB8dzCMy4FixnpzLbEY0ymn+DsStNhw9PuZM X-Received: by 2002:a63:5c11:: with SMTP id q17mr2416485pgb.385.1559718454575; Wed, 05 Jun 2019 00:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559718454; cv=none; d=google.com; s=arc-20160816; b=gLd5beKlxSF9rCFlHmh8tiKjjzlGBjcEVPRiK+0Ol5TbwB3WyqMbrIywNWBSMV+a67 O/cQ4jNlUm80jIgKLAIyokfxGF97kkkc33K4jP2Pnk2KF5TCIAAfkOy+G7tLaE/itP5z N4IIf6okVVTJTXKHb3hxMEhRtm9+7brQ8sCaQUTMDWajwRzkZpxDuKZLor+E/2kf53eH yXUCD/FhFf/sOBEyhM3DBTsgdBuhcFGAz/Z82uQLWkNUhEUMDZBzSoevx8kZ3a8U8dh5 7Z1QL0LMiQ0WqJHMdSN/VA8pNT3X+f7hzwDmdPQr86J/e29y3YWXwkG8+0bd1/znck3+ Jj4g== 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=d2izPr39F3F0VHRMOQwIEoQfvTiBqRIbKynBXN0NUa0=; b=TV2w51zn4B8UWEEGT3T7DqY68b0Cvw49L3Yq0YDuUtXjDdg/IGKBKQ+6zuPQ3zEw23 21xyA6hITZuB984VjK9TmdwhOxn1G4oqZvaTR17XRTNp/1sMD6q0ScrbB7hNfOcsGM19 d/sb5c7DdaNWZ94MdC9l6OwomLCMtvYk08blOdAs+21B6aLezGsb3mlQxCeIEZVCPIFC 6+j9nmHlhCIReVB4HxXmwmVUPdEa4Yhla2tvK7JF4LWW/YSXhWBUEQdy6GAlE7WmdCY+ hIBDHgij7oJ+Mn3ChroarlwgxA3415inS6f/u8Tjly8d++QCCeah6ECcALesh9fmW39V 25VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BySmcBdr; 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 bc7si25705578plb.108.2019.06.05.00.07.17; Wed, 05 Jun 2019 00:07:34 -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=BySmcBdr; 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 S1726881AbfFEHFs (ORCPT + 99 others); Wed, 5 Jun 2019 03:05:48 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36887 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfFEHFo (ORCPT ); Wed, 5 Jun 2019 03:05:44 -0400 Received: by mail-pg1-f194.google.com with SMTP id 20so11881729pgr.4 for ; Wed, 05 Jun 2019 00:05:43 -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=d2izPr39F3F0VHRMOQwIEoQfvTiBqRIbKynBXN0NUa0=; b=BySmcBdri3W99nnsQSAV43VhgYjxYbf/4s1H2Ffq8FJOzXMN069qRgTdjBnaBeXkKe hyOQGqkICDAwG9O/U+MqLX3sX8C5cWdggkkH5I5PUYi6ALpkAfYnyKBwfMuSGHE03tGV +4eS3liPY8ScJWNsOwZbtepvi9X8H/xWmeApo+/0QzjdkD2LicPI/WhnFLM5HcyS1Usd VEwauu6vJt8efqTX3u8HgwaXCBX2GCwjNmbwJK9jBF/7fbz6sMOz4uKZPDOAckDiw9Nc vCe3jvE+6mHuL+l/IW7M29zfaLOGvuWh2ajB2HcMfXGRFeXi5KKlPFWFfYAb2AZYQJdx 8nQQ== 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=d2izPr39F3F0VHRMOQwIEoQfvTiBqRIbKynBXN0NUa0=; b=p/Oz57xSMOfTn8wcCldx02ZlITMD0qQCwRh41cXndBmKCNEnhtMByl9BfP1XXNALVO HUkOlNhbahtgAW4xqPRnb4kwBYcpzJxe7uUVYOAZLH+1Z14fqpgTemxsgzoBJ0w6XJA6 4TKZ0qNFLGwMfRTz0nAef8EeG2BVhiqdX5LR4lfy8zcXfZyjz+KRxutf1HQye2Er5K9I IN4nFXx2MyWlBNe0LITqQA8cmYgaDqm1Fh/4hxRSYC/wcaWfNC+uotqxcAtqDQFvArFI /RM24lXgpHm3iuPVgbAznsElIU4AppKr95TOeCOYTPYW8zIQDbztII2raSIRtSC7k8rl B2eg== X-Gm-Message-State: APjAAAVZeSXJkESz0Z+9iIdr8idKuOEyHL59hHR96JuJ0oJ8MhXdHlXI CuXBa791nStiAsWSdXPHXoQ= X-Received: by 2002:a63:a449:: with SMTP id c9mr2466787pgp.149.1559718343138; Wed, 05 Jun 2019 00:05:43 -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 d132sm6527348pfd.61.2019.06.05.00.05.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2019 00:05:42 -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 , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v3 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy() Date: Wed, 5 Jun 2019 00:05:05 -0700 Message-Id: <20190605070507.11417-14-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190605070507.11417-1-andrew.smirnov@gmail.com> References: <20190605070507.11417-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: 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 a04401cf2a92..4fe7641f84ee 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, @@ -370,7 +369,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; @@ -397,7 +396,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