Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4292776pxk; Tue, 22 Sep 2020 15:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx04h9AG9h+RY0BwJqd7DYDYBv1sQdTZWHZLHfF22/I/2gMzjDWyzoddadwunt6rp542Vo+ X-Received: by 2002:a17:906:c309:: with SMTP id s9mr7760199ejz.167.1600815334873; Tue, 22 Sep 2020 15:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600815334; cv=none; d=google.com; s=arc-20160816; b=kyrRL4gfwhziB2cna5scTq3AI9ChOfX0o9ozDO6Xoy6AkHe3iRHoaaLO/JveH0XAK/ hhn2WOqbuFFLRo/EtL/fTzOxyHuqlVTA9iuCpUarP0Gd7wlpHbrqO/KeveQgXRiM4Odm Y7yH6nOux+893guuBSQ+koslvMP2yKYbgyqIHE+M8y7b1kYQCWgj3E33Dz9ehIuFApAl 1dewnG4+SIP3E1/9LTov8h8wvT7rvH9AOIH/HJFzVwkund/psgkAZVrUSBHLAyHPOxbX kRxZlpGp0Y/vSh2TdUpS5E5nhVcf7aTlxIWytOU3cOM5U/m0Se5/ouyi75IS3pMzsYJy 2gbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w+XgDRjXoq1wZT9e3Q14ufelEFDOaVkPOZlWwl6s0zo=; b=lvHC2G4mFFQckgkOTrgvcvRM+Rey7HFZc93thfaFAOf+7OhCEpfgcMiwDM+OHKEm1F tWLDxi8hFLUIxux/nagk7YLT0GALNl1b0psITO7fn4vv2WLseH20oSICZO7mBuYiCN1n QjFcT/1PMCnXYvrtWSXDRjdPkJhRROcQ41E9Kxx4wucCTugSgdEly1Nj4fhakKpg94Lb LDXHUgebRPAvBVpdc1br4JWPZjEiG63Dd+KRayqhLA2XaqYLkY9yQF0yMFSI2dp7vBcS pL6IKRz7SuGfuUyFQd7d8XtkzOEWMYE0TtNiUtitLphxsPpFWbr7/kWlHZfVGrH9pqI9 eikQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rlkkF7ky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id x23si11634669edi.291.2020.09.22.15.55.11; Tue, 22 Sep 2020 15:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rlkkF7ky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727133AbgIVWxg (ORCPT + 99 others); Tue, 22 Sep 2020 18:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbgIVWw7 (ORCPT ); Tue, 22 Sep 2020 18:52:59 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153E0C0613D4; Tue, 22 Sep 2020 15:52:52 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id s205so15519369lja.7; Tue, 22 Sep 2020 15:52:51 -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=w+XgDRjXoq1wZT9e3Q14ufelEFDOaVkPOZlWwl6s0zo=; b=rlkkF7kyQHGvm+q04ZESEGWslSW+iCMyVRMNsYV7IXiMNPUvOt7kZ+khlByHPDZ7mb iBEX0RUllrYGGiN/g3K+5Se4rUq9xBYbCt5LgxfYdWh712wwkP5SIE1Rwi9yyNe3v0GA 5Z6IBWtPe8NtzDA+OcxMtIUaVfPNomydQsv7lysRkZNzgnGKSFxWFayUz/2Wuyp/FRs5 wFufXyQQHpsnUpBTIUjf9ZKz9ioY+T72t5IUd/GZJ8eJaCZMZk4e61pwy3CFh/U+L4zW 01pel7QjrOOBiSalnlKQ0U33yD+q4unO8paUsQc1BdioydcZ1By+izrczBpi8I7awOT/ 5bDg== 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=w+XgDRjXoq1wZT9e3Q14ufelEFDOaVkPOZlWwl6s0zo=; b=X0zXYagW0HlZUfzNjRqb2+B2Fw/O8mkpjwwVMGjh+xvJIqKRaRPUaNpFxXszHtWr5o /ABvzteRdXH1ms41DWKW13cWhhm6+N3cDA0p2rLF7u1GFohoC9RLUEuBe50wQaBlYZQt gWmZm68niCLRk6db1aN1cdVHhAQYUPqAEA3xQnq4rnRuOvuWXJFt3QO/T59Z+0aCxPZD 8AqoM9nJWdmeeg1YhzPBfe+++LtTe/cMveqRgUYMK9tBYLDnTaLGYsnD4jhN6l1c2lP9 XFZmPPLoIGgt2AaLAT6bh6ZnyxCAW22qfv6tW9dGoNTmG2D98JEr0qoSTx9z7Q78nRG/ XaKg== X-Gm-Message-State: AOAM533ybdXbaqeVSGg0p1QEUm11n/Yk9Xxmj72HF8OU5p91ufGuFCru B9hy58XXKHJnfPaJTbFsuOo= X-Received: by 2002:a2e:8ed2:: with SMTP id e18mr1060736ljl.466.1600815170541; Tue, 22 Sep 2020 15:52:50 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id l15sm3977588lfk.71.2020.09.22.15.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 15:52:50 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Andy Shevchenko Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 21/32] i2c: tegra: Rename wait/poll functions Date: Wed, 23 Sep 2020 01:51:44 +0300 Message-Id: <20200922225155.10798-22-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200922225155.10798-1-digetx@gmail.com> References: <20200922225155.10798-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop '_timeout' postfix from the wait/poll completion function names in order to make the names shorter, making code cleaner a tad. Reviewed-by: Michał Mirosław Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index eb62284e2293..f8bee67370aa 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1010,10 +1010,9 @@ static void tegra_i2c_config_fifo_trig(struct tegra_i2c_dev *i2c_dev, i2c_writel(i2c_dev, val, reg); } -static unsigned long -tegra_i2c_poll_completion_timeout(struct tegra_i2c_dev *i2c_dev, - struct completion *complete, - unsigned int timeout_ms) +static unsigned long tegra_i2c_poll_completion(struct tegra_i2c_dev *i2c_dev, + struct completion *complete, + unsigned int timeout_ms) { ktime_t ktime = ktime_get(); ktime_t ktimeout = ktime_add_ms(ktime, timeout_ms); @@ -1037,16 +1036,14 @@ tegra_i2c_poll_completion_timeout(struct tegra_i2c_dev *i2c_dev, return 0; } -static unsigned long -tegra_i2c_wait_completion_timeout(struct tegra_i2c_dev *i2c_dev, - struct completion *complete, - unsigned int timeout_ms) +static unsigned long tegra_i2c_wait_completion(struct tegra_i2c_dev *i2c_dev, + struct completion *complete, + unsigned int timeout_ms) { unsigned long ret; if (i2c_dev->is_curr_atomic_xfer) { - ret = tegra_i2c_poll_completion_timeout(i2c_dev, complete, - timeout_ms); + ret = tegra_i2c_poll_completion(i2c_dev, complete, timeout_ms); } else { enable_irq(i2c_dev->irq); ret = wait_for_completion_timeout(complete, @@ -1064,8 +1061,7 @@ tegra_i2c_wait_completion_timeout(struct tegra_i2c_dev *i2c_dev, * needs to be checked after timeout. */ if (ret == 0) - ret = tegra_i2c_poll_completion_timeout(i2c_dev, - complete, 0); + ret = tegra_i2c_poll_completion(i2c_dev, complete, 0); } return ret; @@ -1091,8 +1087,7 @@ static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) i2c_writel(i2c_dev, reg, I2C_BUS_CLEAR_CNFG); tegra_i2c_unmask_irq(i2c_dev, I2C_INT_BUS_CLR_DONE); - time_left = tegra_i2c_wait_completion_timeout( - i2c_dev, &i2c_dev->msg_complete, 50); + time_left = tegra_i2c_wait_completion(i2c_dev, &i2c_dev->msg_complete, 50); tegra_i2c_mask_irq(i2c_dev, I2C_INT_BUS_CLR_DONE); if (time_left == 0) { @@ -1244,8 +1239,9 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, i2c_readl(i2c_dev, I2C_INT_MASK)); if (i2c_dev->is_curr_dma_xfer) { - time_left = tegra_i2c_wait_completion_timeout( - i2c_dev, &i2c_dev->dma_complete, xfer_time); + time_left = tegra_i2c_wait_completion(i2c_dev, + &i2c_dev->dma_complete, + xfer_time); /* * Synchronize DMA first, since dmaengine_terminate_sync() @@ -1276,8 +1272,8 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, } } - time_left = tegra_i2c_wait_completion_timeout( - i2c_dev, &i2c_dev->msg_complete, xfer_time); + time_left = tegra_i2c_wait_completion(i2c_dev, &i2c_dev->msg_complete, + xfer_time); tegra_i2c_mask_irq(i2c_dev, int_mask); -- 2.27.0