Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: iio: meter: ade7754: Match alignment with open parenthesis

Reorganize the parameters to improve the readability of the code in
two manners:
- parameters of distinctive variable types on different lines
- parameters of similar variable types on the same line

Also, take advantage of the horizontal space available and place
all the parameters on a single line.

Issues found by checkpatch.pl script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Georgiana Rodica Chelu and committed by
Greg Kroah-Hartman
748df3b1 89237e06

+25 -34
+25 -34
drivers/staging/iio/meter/ade7754.c
··· 23 23 #include "meter.h" 24 24 #include "ade7754.h" 25 25 26 - static int ade7754_spi_write_reg_8(struct device *dev, 27 - u8 reg_address, 28 - u8 val) 26 + static int ade7754_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val) 29 27 { 30 28 int ret; 31 29 struct iio_dev *indio_dev = dev_to_iio_dev(dev); ··· 40 42 } 41 43 42 44 static int ade7754_spi_write_reg_16(struct device *dev, 43 - u8 reg_address, 44 - u16 value) 45 + u8 reg_address, u16 value) 45 46 { 46 47 int ret; 47 48 struct iio_dev *indio_dev = dev_to_iio_dev(dev); ··· 56 59 return ret; 57 60 } 58 61 59 - static int ade7754_spi_read_reg_8(struct device *dev, 60 - u8 reg_address, 61 - u8 *val) 62 + static int ade7754_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val) 62 63 { 63 64 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 64 65 struct ade7754_state *st = iio_priv(indio_dev); ··· 65 70 ret = spi_w8r8(st->us, ADE7754_READ_REG(reg_address)); 66 71 if (ret < 0) { 67 72 dev_err(&st->us->dev, "problem when reading 8 bit register 0x%02X", 68 - reg_address); 73 + reg_address); 69 74 return ret; 70 75 } 71 76 *val = ret; ··· 74 79 } 75 80 76 81 static int ade7754_spi_read_reg_16(struct device *dev, 77 - u8 reg_address, 78 - u16 *val) 82 + u8 reg_address, u16 *val) 79 83 { 80 84 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 81 85 struct ade7754_state *st = iio_priv(indio_dev); ··· 93 99 } 94 100 95 101 static int ade7754_spi_read_reg_24(struct device *dev, 96 - u8 reg_address, 97 - u32 *val) 102 + u8 reg_address, u32 *val) 98 103 { 99 104 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 100 105 struct ade7754_state *st = iio_priv(indio_dev); ··· 116 123 ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); 117 124 if (ret) { 118 125 dev_err(&st->us->dev, "problem when reading 24 bit register 0x%02X", 119 - reg_address); 126 + reg_address); 120 127 goto error_ret; 121 128 } 122 129 *val = (st->rx[1] << 16) | (st->rx[2] << 8) | st->rx[3]; ··· 127 134 } 128 135 129 136 static ssize_t ade7754_read_8bit(struct device *dev, 130 - struct device_attribute *attr, 131 - char *buf) 137 + struct device_attribute *attr, 138 + char *buf) 132 139 { 133 140 int ret; 134 141 u8 val = 0; ··· 142 149 } 143 150 144 151 static ssize_t ade7754_read_16bit(struct device *dev, 145 - struct device_attribute *attr, 146 - char *buf) 152 + struct device_attribute *attr, 153 + char *buf) 147 154 { 148 155 int ret; 149 156 u16 val = 0; ··· 157 164 } 158 165 159 166 static ssize_t ade7754_read_24bit(struct device *dev, 160 - struct device_attribute *attr, 161 - char *buf) 167 + struct device_attribute *attr, 168 + char *buf) 162 169 { 163 170 int ret; 164 171 u32 val = 0; ··· 172 179 } 173 180 174 181 static ssize_t ade7754_write_8bit(struct device *dev, 175 - struct device_attribute *attr, 176 - const char *buf, 177 - size_t len) 182 + struct device_attribute *attr, 183 + const char *buf, 184 + size_t len) 178 185 { 179 186 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 180 187 int ret; ··· 190 197 } 191 198 192 199 static ssize_t ade7754_write_16bit(struct device *dev, 193 - struct device_attribute *attr, 194 - const char *buf, 195 - size_t len) 200 + struct device_attribute *attr, 201 + const char *buf, 202 + size_t len) 196 203 { 197 204 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 198 205 int ret; ··· 396 403 } 397 404 398 405 static ssize_t ade7754_read_frequency(struct device *dev, 399 - struct device_attribute *attr, 400 - char *buf) 406 + struct device_attribute *attr, 407 + char *buf) 401 408 { 402 409 int ret; 403 410 u8 t; 404 411 int sps; 405 412 406 - ret = ade7754_spi_read_reg_8(dev, 407 - ADE7754_WAVMODE, 408 - &t); 413 + ret = ade7754_spi_read_reg_8(dev, ADE7754_WAVMODE, &t); 409 414 if (ret) 410 415 return ret; 411 416 ··· 414 423 } 415 424 416 425 static ssize_t ade7754_write_frequency(struct device *dev, 417 - struct device_attribute *attr, 418 - const char *buf, 419 - size_t len) 426 + struct device_attribute *attr, 427 + const char *buf, 428 + size_t len) 420 429 { 421 430 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 422 431 struct ade7754_state *st = iio_priv(indio_dev);