Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2821036ybi; Sun, 9 Jun 2019 22:09:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaJZUOCoEkxHAY+25HjEBkUVJKdn9F0STUPHboZijqXFTTOYwc2owtkDPsBp53JjNtdULB X-Received: by 2002:a63:2844:: with SMTP id o65mr13700456pgo.297.1560143376752; Sun, 09 Jun 2019 22:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560143376; cv=none; d=google.com; s=arc-20160816; b=Gi1bm5C/utXckV/6uBaG85lOnXvdKv+xgJob4x5Dp53yWgHVWP4TOURcUE4OpbhUjm kvOJNiz+9MCMa7KlbtEQomQ/fbWsMBbC/FjwUg1mPZKWG+5Evi63MJkPDNB/14qbimZ7 JVhBFGljgy6CmZdo9XX3Tyuwri2B4mH24Y9gohPRRZF+Tyw8csMv0S2VCx6JHMzhYj6p hLDL5X9Nu2e3fbXrVpcuQ9lV6e/u8M4TZCJBhYDtPIIOI+HFoPt2JLDg4EP1+Yxmj4j7 CE8U+2Yz0E/NK3GP/3X9zj3CwBcPbRO4NmwcNQF4ISVG+lgMaoywnc+CLM1iGFCaiHjN MBBQ== 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=gkVAgi883mFo4ovDrxUpbkstUJM7W+FogM1jwcRwhyY=; b=R0msCM15F1h574wzBfzV0GXfgm9t0hgo0OfXHU6AxhVzVAqgimF92mLM1PVZ4MnZoq /41Nz3FA20d71D97CBY89Cv/1r8+OA6exsAcUftksTlyugaJ3TQUdM5lncwCsPV5fvEB CODxgeOf3OukI/ibw7rKoEW3nJBhaLT/bTk5RjR/4ZNK8WDPVeWE1V8ku7GC8toU7wXu TthE85OFo8uSc8Tweq0ou1NsaAy9Jah8HOilBIK5e4vHdUSz16TdjyUSqjtKB7mDeJW3 bmrU0E5xfVKRLjsVFMADi9QZcb9+0ixqcEdwwGKClpAZ8IaI3bVq1rbxc6hIEQ7m/BSI /bkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=SoQJ4Vi1; 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 f32si9256956pjg.42.2019.06.09.22.09.22; Sun, 09 Jun 2019 22:09:36 -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=SoQJ4Vi1; 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 S2387586AbfFJFJH (ORCPT + 99 others); Mon, 10 Jun 2019 01:09:07 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:14300 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387565AbfFJFJG (ORCPT ); Mon, 10 Jun 2019 01:09:06 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 09 Jun 2019 22:09:03 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sun, 09 Jun 2019 22:09:04 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sun, 09 Jun 2019 22:09:04 -0700 Received: from HQMAIL103.nvidia.com (172.20.187.11) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 10 Jun 2019 05:09:04 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 10 Jun 2019 05:09:04 +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 ; Sun, 09 Jun 2019 22:09:04 -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 V3 3/6] i2c: tegra: fix alignment and spacing violations Date: Sun, 9 Jun 2019 22:08:41 -0700 Message-ID: <1560143324-21754-3-git-send-email-bbiswas@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1560143324-21754-1-git-send-email-bbiswas@nvidia.com> References: <1560143324-21754-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=1560143343; bh=gkVAgi883mFo4ovDrxUpbkstUJM7W+FogM1jwcRwhyY=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=SoQJ4Vi1AYo36gY6q/Fk6uzkObqqNHPHgcDbi9Eb7NDMFVzgMDSwoKVFTCOSCU4g+ ksAMQ9/+2fBrx0Dm3dV+Y3kdOUARVuaNZGT5TcL8h5PhFiA/X4BAyw0voaXaex1zFs FruibzQeijHE1A27juK2qbXHdkp7aR+h16vKwc99/5THy4NBJOfNOhMtUvYaAWT5Ey vG/pMuPULTCGd29W9CX3JwC1G1qH0Ym39DwPkRenM6OY40JIs9Rd7DiO471N9JR+ej 7wnO9QmLGSbQaPwzijWOThRD2jk9yhoMG8VcjrJMIoNVzEnTWXB2gAow2ZanAfzC1q Vcng2VVZ/ALrg== 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 Reviewed-by: Dmitry Osipenko --- 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