From patchwork Sun Sep 6 18:50:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 254807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5451C43461 for ; Sun, 6 Sep 2020 18:52:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF417208B3 for ; Sun, 6 Sep 2020 18:52:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RPuSjTRi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729234AbgIFSwP (ORCPT ); Sun, 6 Sep 2020 14:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729203AbgIFSwB (ORCPT ); Sun, 6 Sep 2020 14:52:01 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9868C061755; Sun, 6 Sep 2020 11:51:59 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id u8so865453lff.1; Sun, 06 Sep 2020 11:51:59 -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=7OtLSTfQ0S+IgkE4lVHFt+06NUFbn0hYysWzQd0VDG8=; b=RPuSjTRib8bUKVFVCg+XQRm5lUCscZCuORRe6rgFtNbWH760VcwUBbj79tUDIySVD/ MH7YS8mNpvrTUKbNMYT6og3Q1GTQczLHR42miKiVClNTYMDH2/fuCjxtF1UjGw8dYmKf /qYnl4PQQsP1dAOgC3+ZzRbadDlbq0Ga1VEx9y2Sp3LZcgoIGQByciTPie+9+Z5P5RQh 9lZ3lAbNXl2cSXkUJinejkowuGieGbo4Sm5olM+plzer8xYnbh69Zh4sGzQfki2I4HUH 86yZIolGHrMDPrXsB8fdlo/N+LgPV5mLGw0tbHFL3aJ83ciTQwN3QeWpBJYlqE8+6JY5 qYFA== 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=7OtLSTfQ0S+IgkE4lVHFt+06NUFbn0hYysWzQd0VDG8=; b=YbjWvMUTFaej8IUsGQTKPfJFDpX4mZajjV9vDpPWytvOEp3dD1q5WKPUrU0EfF7fmi 8GbXVOllY8o68BJGJzpiJUFNwRzh3eMNle/46nxk4vKmBUagRxR8TzQvpGsrRX+o4AnQ KDmm+ao9Z5jlUfIurvzDdnhBgMWNwo9s2YO+gXOfmVEOL7rKIW6rv/iF65ckJO2Yw+sm phe5icrYStxzVCtbZa3czQp7jjRzvDGoQJdOgM9BmE9eY5Ur2XVaUAz8RYZjwl6pdRCn zcfEpsBU3c4fAldUnblZSpbKoxk15JdEvJi9oqYfuqAr9nHVncrpk0IsOCPU/IyzVzV4 fgDA== X-Gm-Message-State: AOAM533asluwtjKZSA6eBSvYnM+RbbkVa7QlRru3ZDduC/exzZ0FHB+e e7m2H1cZQP8CehnekqULK6M= X-Google-Smtp-Source: ABdhPJw7ZOUT5m+cY/9+7uWecqIS46A0YFRzmO7llDaytTstL326zdfOV57jX0uawoq6AEk3NjMXag== X-Received: by 2002:a19:e57:: with SMTP id 84mr8599996lfo.161.1599418318377; Sun, 06 Sep 2020 11:51:58 -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 s3sm4883407ljd.44.2020.09.06.11.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 11:51:57 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , Andy Shevchenko Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 22/36] i2c: tegra: Rename variable in tegra_i2c_issue_bus_clear() Date: Sun, 6 Sep 2020 21:50:25 +0300 Message-Id: <20200906185039.22700-23-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200906185039.22700-1-digetx@gmail.com> References: <20200906185039.22700-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Rename variable "reg" to "val" in order to better reflect the actual usage of the variable in the code and to make naming consistent with the rest of the code. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 4436fecee283..8c87382b1612 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1093,20 +1093,20 @@ static unsigned long tegra_i2c_wait_completion(struct tegra_i2c_dev *i2c_dev, static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) { struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap); - u32 reg, time_left; + u32 val, time_left; int err; reinit_completion(&i2c_dev->msg_complete); - reg = FIELD_PREP(I2C_BC_SCLK_THRESHOLD, 9) | I2C_BC_STOP_COND | + val = FIELD_PREP(I2C_BC_SCLK_THRESHOLD, 9) | I2C_BC_STOP_COND | I2C_BC_TERMINATE; - i2c_writel(i2c_dev, reg, I2C_BUS_CLEAR_CNFG); + i2c_writel(i2c_dev, val, I2C_BUS_CLEAR_CNFG); err = tegra_i2c_wait_for_config_load(i2c_dev); if (err) return err; - reg |= I2C_BC_ENABLE; - i2c_writel(i2c_dev, reg, I2C_BUS_CLEAR_CNFG); + val |= I2C_BC_ENABLE; + i2c_writel(i2c_dev, val, I2C_BUS_CLEAR_CNFG); tegra_i2c_unmask_irq(i2c_dev, I2C_INT_BUS_CLR_DONE); time_left = tegra_i2c_wait_completion(i2c_dev, &i2c_dev->msg_complete, @@ -1118,8 +1118,8 @@ static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) return -ETIMEDOUT; } - reg = i2c_readl(i2c_dev, I2C_BUS_CLEAR_STATUS); - if (!(reg & I2C_BC_STATUS)) { + val = i2c_readl(i2c_dev, I2C_BUS_CLEAR_STATUS); + if (!(val & I2C_BC_STATUS)) { dev_err(i2c_dev->dev, "un-recovered arbitration lost\n"); return -EIO;