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

hwmon: (adt7470) Fix some style issues

In preparation for the changes that follow fix up some existing style
issues.
Specifically:
- add blank line between variable declaration and code
- use strscpy instead of strlcpy
- remove unnecessary braces

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20210826024121.15665-2-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Chris Packham and committed by
Guenter Roeck
23bd022a 25572c81

+3 -3
+3 -3
drivers/hwmon/adt7470.c
··· 174 174 static inline int adt7470_read_word_data(struct i2c_client *client, u8 reg) 175 175 { 176 176 u16 foo; 177 + 177 178 foo = i2c_smbus_read_byte_data(client, reg); 178 179 foo |= ((u16)i2c_smbus_read_byte_data(client, reg + 1) << 8); 179 180 return foo; ··· 1283 1282 if (revision != ADT7470_REVISION) 1284 1283 return -ENODEV; 1285 1284 1286 - strlcpy(info->type, "adt7470", I2C_NAME_SIZE); 1285 + strscpy(info->type, "adt7470", I2C_NAME_SIZE); 1287 1286 1288 1287 return 0; 1289 1288 } ··· 1332 1331 1333 1332 data->auto_update = kthread_run(adt7470_update_thread, client, "%s", 1334 1333 dev_name(hwmon_dev)); 1335 - if (IS_ERR(data->auto_update)) { 1334 + if (IS_ERR(data->auto_update)) 1336 1335 return PTR_ERR(data->auto_update); 1337 - } 1338 1336 1339 1337 return 0; 1340 1338 }