From patchwork Sat Feb 10 20:23:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10210561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B95860247 for ; Sat, 10 Feb 2018 20:23:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AF4D2959A for ; Sat, 10 Feb 2018 20:23:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F20E6295A8; Sat, 10 Feb 2018 20:23:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FD002959A for ; Sat, 10 Feb 2018 20:23:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbeBJUXV (ORCPT ); Sat, 10 Feb 2018 15:23:21 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:44859 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752317AbeBJUXU (ORCPT ); Sat, 10 Feb 2018 15:23:20 -0500 Received: by mail-qk0-f196.google.com with SMTP id n188so14164195qkn.11; Sat, 10 Feb 2018 12:23:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=qcP6IyTvCvJLS4Stv2ANnrqac8jUQ3h/78xeGHMbxE0=; b=UL6xJuLFBua2hSFob5eOwov0sAHCx3xQLK9lu9jD34YvIR+XMSbYeiHceTOUCacWtf /hV80l3X0NvicBdl4se8ajn0v3dVPN5gOPnb6SAdetw7mB37aPQsX30Fdh5H0yTjIsIq Azskw11xfaVVQmZ9GQ3DDzJrAZtFYrTeLU/v+fHthTXCpwpjD5+5islvPaAGkBvDMGDi J5F99PySVGRE7XidMtAIOhgjnWNG5dXRafQ6Zi/CmUryCzqTN+UgzwNoCG231Z6HNMu8 SdkKrv2QwSRjXHOmPcTPi1RCFjMe2Hdu3TBy3r9d7DgWhpLkfCL2XVE7WQ87Wvj3qkCk 7NEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=qcP6IyTvCvJLS4Stv2ANnrqac8jUQ3h/78xeGHMbxE0=; b=lfcMk1TTtLGnJVuu2LBYluycMW4ONHIHal5asib8FNAsTt55aor/t6NcC/j+CznbK5 ByMdi9g9Ghv4D1qlxkPqkF7rcOZWUz6aV29ZPeqK32BUyBDg1Uk+ACnEfy4MwOqQQ6fk TSYh9MJv9NAmfdJ0xQVKCxJVVk0HhVW0OFrXabSVJA+WkYrTEAv3FT2+vfaSx1kcZ2rp crbCU6jF6wTtagFcfEUlJOLAQpMX9g+zNWuUpFaynWhVesoTMF+Hs1U5cXK2ceHMG+YC 2xR8GGIP4BNhJ9Hj19DR2p6/WRw2QNN55Qjm0JoQr/mnYUQ3h+K7qTzUUsROzGN3UIGO AMmw== X-Gm-Message-State: APf1xPA0lcZRpqhUKGQtLxwd88Wq3Gc+rCCUT9R8mlokyWrJZdtlALqn qJUXtGyciWvXDy49DvUTqEI= X-Google-Smtp-Source: AH8x2255g9PALqhUePvxaRT6FWpeWKOYZ0vqimaQ/sMNYIa4RtWZHpwWDG5oKDNIfmHvrEqw1ROXGA== X-Received: by 10.55.12.19 with SMTP id 19mr2978358qkm.277.1518294199849; Sat, 10 Feb 2018 12:23:19 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id r53sm4038576qtr.57.2018.02.10.12.23.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Feb 2018 12:23:18 -0800 (PST) Date: Sat, 10 Feb 2018 18:23:15 -0200 From: rodrigosiqueira To: jic23@kernel.org Cc: knaack.h@gmx.de, lars@metafoo.de, daniel.baluta@nxp.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: ade7759: Fix open parenthesis alignment Message-ID: <20180210202315.l2jecbrips2g3vuq@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20171215 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the CHECKs reported by checkpatch.pl for "alignment should match open parenthesis" Signed-off-by: rodrigosiqueira --- drivers/staging/iio/meter/ade7759.c | 80 ++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/drivers/staging/iio/meter/ade7759.c b/drivers/staging/iio/meter/ade7759.c index d99cf508d8d0..1decb2b8afab 100644 --- a/drivers/staging/iio/meter/ade7759.c +++ b/drivers/staging/iio/meter/ade7759.c @@ -72,8 +72,8 @@ struct ade7759_state { }; static int ade7759_spi_write_reg_8(struct device *dev, - u8 reg_address, - u8 val) + u8 reg_address, + u8 val) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -91,8 +91,8 @@ static int ade7759_spi_write_reg_8(struct device *dev, /*Unlocked version of ade7759_spi_write_reg_16 function */ static int __ade7759_spi_write_reg_16(struct device *dev, - u8 reg_address, - u16 value) + u8 reg_address, + u16 value) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7759_state *st = iio_priv(indio_dev); @@ -104,8 +104,8 @@ static int __ade7759_spi_write_reg_16(struct device *dev, } static int ade7759_spi_write_reg_16(struct device *dev, - u8 reg_address, - u16 value) + u8 reg_address, + u16 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -119,8 +119,8 @@ static int ade7759_spi_write_reg_16(struct device *dev, } static int ade7759_spi_read_reg_8(struct device *dev, - u8 reg_address, - u8 *val) + u8 reg_address, + u8 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7759_state *st = iio_priv(indio_dev); @@ -128,8 +128,9 @@ static int ade7759_spi_read_reg_8(struct device *dev, ret = spi_w8r8(st->us, ADE7759_READ_REG(reg_address)); if (ret < 0) { - dev_err(&st->us->dev, "problem when reading 8 bit register 0x%02X", - reg_address); + dev_err(&st->us->dev, + "problem when reading 8 bit register 0x%02X", + reg_address); return ret; } *val = ret; @@ -138,8 +139,8 @@ static int ade7759_spi_read_reg_8(struct device *dev, } static int ade7759_spi_read_reg_16(struct device *dev, - u8 reg_address, - u16 *val) + u8 reg_address, + u16 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7759_state *st = iio_priv(indio_dev); @@ -158,8 +159,8 @@ static int ade7759_spi_read_reg_16(struct device *dev, } static int ade7759_spi_read_reg_40(struct device *dev, - u8 reg_address, - u64 *val) + u8 reg_address, + u64 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7759_state *st = iio_priv(indio_dev); @@ -179,8 +180,9 @@ static int ade7759_spi_read_reg_40(struct device *dev, ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); if (ret) { - dev_err(&st->us->dev, "problem when reading 40 bit register 0x%02X", - reg_address); + dev_err(&st->us->dev, + "problem when reading 40 bit register 0x%02X", + reg_address); goto error_ret; } *val = ((u64)st->rx[1] << 32) | ((u64)st->rx[2] << 24) | @@ -192,8 +194,8 @@ static int ade7759_spi_read_reg_40(struct device *dev, } static ssize_t ade7759_read_8bit(struct device *dev, - struct device_attribute *attr, - char *buf) + struct device_attribute *attr, + char *buf) { int ret; u8 val = 0; @@ -207,8 +209,8 @@ static ssize_t ade7759_read_8bit(struct device *dev, } static ssize_t ade7759_read_16bit(struct device *dev, - struct device_attribute *attr, - char *buf) + struct device_attribute *attr, + char *buf) { int ret; u16 val = 0; @@ -222,8 +224,8 @@ static ssize_t ade7759_read_16bit(struct device *dev, } static ssize_t ade7759_read_40bit(struct device *dev, - struct device_attribute *attr, - char *buf) + struct device_attribute *attr, + char *buf) { int ret; u64 val = 0; @@ -237,9 +239,9 @@ static ssize_t ade7759_read_40bit(struct device *dev, } static ssize_t ade7759_write_8bit(struct device *dev, - struct device_attribute *attr, - const char *buf, - size_t len) + struct device_attribute *attr, + const char *buf, + size_t len) { struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; @@ -255,9 +257,9 @@ static ssize_t ade7759_write_8bit(struct device *dev, } static ssize_t ade7759_write_16bit(struct device *dev, - struct device_attribute *attr, - const char *buf, - size_t len) + struct device_attribute *attr, + const char *buf, + size_t len) { struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; @@ -277,9 +279,7 @@ static int ade7759_reset(struct device *dev) int ret; u16 val; - ret = ade7759_spi_read_reg_16(dev, - ADE7759_MODE, - &val); + ret = ade7759_spi_read_reg_16(dev, ADE7759_MODE, &val); if (ret < 0) return ret; @@ -365,9 +365,7 @@ static int ade7759_stop_device(struct device *dev) int ret; u16 val; - ret = ade7759_spi_read_reg_16(dev, - ADE7759_MODE, - &val); + ret = ade7759_spi_read_reg_16(dev, ADE7759_MODE, &val); if (ret < 0) { dev_err(dev, "unable to power down the device, error: %d\n", ret); @@ -404,16 +402,14 @@ static int ade7759_initial_setup(struct iio_dev *indio_dev) } static ssize_t ade7759_read_frequency(struct device *dev, - struct device_attribute *attr, - char *buf) + struct device_attribute *attr, + char *buf) { int ret; u16 t; int sps; - ret = ade7759_spi_read_reg_16(dev, - ADE7759_MODE, - &t); + ret = ade7759_spi_read_reg_16(dev, ADE7759_MODE, &t); if (ret) return ret; @@ -424,9 +420,9 @@ static ssize_t ade7759_read_frequency(struct device *dev, } static ssize_t ade7759_write_frequency(struct device *dev, - struct device_attribute *attr, - const char *buf, - size_t len) + struct device_attribute *attr, + const char *buf, + size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7759_state *st = iio_priv(indio_dev);