Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp111644ybi; Fri, 7 Jun 2019 05:08:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqI4MKjiHP06ikP3usRG2fFQhX4BSqwIrZ8yUUlBGgMgJeylJTxJ25ZI9AcxBIOpODYBM/ X-Received: by 2002:a63:5023:: with SMTP id e35mr2332765pgb.194.1559909283740; Fri, 07 Jun 2019 05:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559909283; cv=none; d=google.com; s=arc-20160816; b=r3ktaHmN07entWxv6e6/sqEl8MvU0omdsPOdwCopybbB/yYu6GK/Q0WysYE9gRP6vA 1dIwN3OBRDytVut6Ht+i1rxAS4Ns5m0ryjylyqAfNR6rxOpH/uP3hTkHIDWubO/aQoNh 5076arNDOETDrXjkAFiSWPueiyTq+N0x3RyWTqpgbzpgm0IBov8KHwo9qi7WFJJeTVaD WPwgKGDY0hRHttTFMFCOa1EeUTI3GlRv13579muKtrwpiym5HCJSl2szn0Rf26bLQYMl s/58k+LgC5iCsmVgQ0YilfM7F9/2meOswi8RDPfEhfe8qN/zEUw99r9TSm89Bd7g9Sz2 KUUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=LgZQmiJwdtHHDZHkPG5XRynz4q6S5LEc+fCQlFx6LPk=; b=JWUDFoqNE8nyXLw0iEVoFVywOjJXbZYtRKOlpeNt0Bi/0XCrzYAyUbiu5f1U8gpkjh RayKDqiK1hXApJHgF/D9xCzQ6Pj/kuuep46yTmCKYUQ8m9wHzpEyBXS6UgaLGt9n55uq dVOOsZVXQypkOy8LnEUsACk96m8SPihDkMbgAV73mOnMB1bGL3zgPPlaXEVCkmT+IF7a HZqf/KhPGmmju3eReTTHTX+1aIsVSetHwu8OuBkjh0t2Ig8M7cJJabt9OFj4zxCCmGZ7 F3l0XpAZ8aOC0oXFbm9SujXrH6V9VRaIOD//RCPBu3o46kQm2A67MBrdPvxSlu0+xcyG qcRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="S/cxodKr"; 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=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o10si1495351pfo.196.2019.06.07.05.07.46; Fri, 07 Jun 2019 05:08:03 -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=@nvidia.com header.s=n1 header.b="S/cxodKr"; 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=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728906AbfFGLzY (ORCPT + 99 others); Fri, 7 Jun 2019 07:55:24 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:17397 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbfFGLzX (ORCPT ); Fri, 7 Jun 2019 07:55:23 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 07 Jun 2019 04:55:22 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 07 Jun 2019 04:55:22 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 07 Jun 2019 04:55:22 -0700 Received: from HQMAIL104.nvidia.com (172.18.146.11) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 7 Jun 2019 11:55:22 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 7 Jun 2019 11:55:22 +0000 Received: from dhcp-10-19-65-14.client.nvidia.com (Not Verified[10.19.65.14]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 07 Jun 2019 04:55:22 -0700 From: Bitan Biswas To: Laxman Dewangan , Thierry Reding , Jonathan Hunter , , , , Peter Rosin , Wolfram Sang , Dmitry Osipenko CC: Shardar Mohammed , Sowjanya Komatineni , Mantravadi Karthik , Bitan Biswas Subject: [PATCH V1 3/6] i2c: tegra: fix alignment and spacing violations Date: Fri, 7 Jun 2019 04:55:04 -0700 Message-ID: <1559908507-31192-3-git-send-email-bbiswas@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559908507-31192-1-git-send-email-bbiswas@nvidia.com> References: <1559908507-31192-1-git-send-email-bbiswas@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1559908522; bh=LgZQmiJwdtHHDZHkPG5XRynz4q6S5LEc+fCQlFx6LPk=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=S/cxodKrFiJqjy4KwAPdXe8843ZDNqQbfeukVMR2BElTJ8RZ220uPx2EXyqLxFB3b kyoplW8JbwrQPd9XMLi8TCi9XRuo3+JCRF9jeO+oSpdU+2/2O0MOkGO79uyWLW000n 8jh7jtaMZsnXrJ6w+9jzCaU2l4/EyljlEoa0y8EuGbZ/Y4e6+ZXwEDhDx5EnWc4K7V 5DNhXZbQx1Iz0iAzkRR8EZM0xcFCt25xIUACtM+d1D7Q9EWtJdTYd3MXBzcNdSACMj PDzH8uT/Alj0Wj1uebs51uSw3zLShfaWxZOvji02zmJUICauu8ovpeX4U0tQiGXiQC wauuCIcM/Zx2g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix checkpatch.pl alignment and blank line check(s) in i2c-tegra.c Signed-off-by: Bitan Biswas --- drivers/i2c/busses/i2c-tegra.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index f7116b7..2d381de 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -295,7 +295,7 @@ static u32 dvc_readl(struct tegra_i2c_dev *i2c_dev, unsigned long reg) * to the I2C block inside the DVC block */ static unsigned long tegra_i2c_reg_addr(struct tegra_i2c_dev *i2c_dev, - unsigned long reg) + unsigned long reg) { if (i2c_dev->is_dvc) reg += (reg >= I2C_TX_FIFO) ? 0x10 : 0x40; @@ -303,7 +303,7 @@ static unsigned long tegra_i2c_reg_addr(struct tegra_i2c_dev *i2c_dev, } static void i2c_writel(struct tegra_i2c_dev *i2c_dev, u32 val, - unsigned long reg) + unsigned long reg) { writel(val, i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg)); @@ -318,13 +318,13 @@ static u32 i2c_readl(struct tegra_i2c_dev *i2c_dev, unsigned long reg) } static void i2c_writesl(struct tegra_i2c_dev *i2c_dev, void *data, - unsigned long reg, int len) + unsigned long reg, int len) { writesl(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg), data, len); } static void i2c_readsl(struct tegra_i2c_dev *i2c_dev, void *data, - unsigned long reg, int len) + unsigned long reg, int len) { readsl(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg), data, len); } @@ -669,10 +669,11 @@ static int tegra_i2c_wait_for_config_load(struct tegra_i2c_dev *i2c_dev) i2c_writel(i2c_dev, I2C_MSTR_CONFIG_LOAD, I2C_CONFIG_LOAD); if (in_interrupt()) err = readl_poll_timeout_atomic(addr, val, val == 0, - 1000, I2C_CONFIG_LOAD_TIMEOUT); + 1000, + I2C_CONFIG_LOAD_TIMEOUT); else - err = readl_poll_timeout(addr, val, val == 0, - 1000, I2C_CONFIG_LOAD_TIMEOUT); + err = readl_poll_timeout(addr, val, val == 0, 1000, + I2C_CONFIG_LOAD_TIMEOUT); if (err) { dev_warn(i2c_dev->dev, @@ -1013,7 +1014,8 @@ static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) } static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, - struct i2c_msg *msg, enum msg_end_type end_state) + struct i2c_msg *msg, + enum msg_end_type end_state) { u32 packet_header; u32 int_mask; @@ -1150,9 +1152,8 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, if (err) return err; - time_left = wait_for_completion_timeout( - &i2c_dev->dma_complete, - msecs_to_jiffies(xfer_time)); + time_left = wait_for_completion_timeout(&i2c_dev->dma_complete, + msecs_to_jiffies(xfer_time)); if (time_left == 0) { dev_err(i2c_dev->dev, "DMA transfer timeout\n"); dmaengine_terminate_sync(i2c_dev->msg_read ? @@ -1214,7 +1215,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, } static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - int num) + int num) { struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap); int i; @@ -1260,14 +1261,15 @@ static void tegra_i2c_parse_dt(struct tegra_i2c_dev *i2c_dev) { struct device_node *np = i2c_dev->dev->of_node; int ret; + bool multi_mode; ret = of_property_read_u32(np, "clock-frequency", - &i2c_dev->bus_clk_rate); + &i2c_dev->bus_clk_rate); if (ret) i2c_dev->bus_clk_rate = 100000; /* default clock rate */ - i2c_dev->is_multimaster_mode = of_property_read_bool(np, - "multi-master"); + multi_mode = of_property_read_bool(np, "multi-master"); + i2c_dev->is_multimaster_mode = multi_mode; } static const struct i2c_algorithm tegra_i2c_algo = { @@ -1611,7 +1613,7 @@ static int tegra_i2c_probe(struct platform_device *pdev) } ret = devm_request_irq(&pdev->dev, i2c_dev->irq, - tegra_i2c_isr, 0, dev_name(&pdev->dev), i2c_dev); + tegra_i2c_isr, 0, dev_name(&pdev->dev), i2c_dev); if (ret) { dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq); goto release_dma; @@ -1704,6 +1706,7 @@ static const struct dev_pm_ops tegra_i2c_pm = { SET_RUNTIME_PM_OPS(tegra_i2c_runtime_suspend, tegra_i2c_runtime_resume, NULL) }; + #define TEGRA_I2C_PM (&tegra_i2c_pm) #else #define TEGRA_I2C_PM NULL -- 2.7.4