linux/debian/patches/bugfix/all/rtc-x1205-new-style-convers...

58 lines
1.8 KiB
Diff

From: Andrew Morton <akpm@linux-foundation.org>
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
#94: FILE: drivers/rtc/rtc-x1205.c:503:
+ dev_dbg(&client->dev, "%s\n", __FUNCTION__);
WARNING: braces {} are not necessary for single statement blocks
#99: FILE: drivers/rtc/rtc-x1205.c:505:
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+ return -ENODEV;
}
WARNING: braces {} are not necessary for single statement blocks
#106: FILE: drivers/rtc/rtc-x1205.c:509:
+ if (x1205_validate_client(client) < 0) {
+ return -ENODEV;
}
total: 0 errors, 3 warnings, 185 lines checked
./patches/rtc-x1205-new-style-conversion.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Please run checkpatch prior to sending patches
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/rtc-x1205.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff -puN drivers/rtc/rtc-x1205.c~rtc-x1205-new-style-conversion-checkpatch-fixes drivers/rtc/rtc-x1205.c
--- a/drivers/rtc/rtc-x1205.c~rtc-x1205-new-style-conversion-checkpatch-fixes
+++ a/drivers/rtc/rtc-x1205.c
@@ -500,15 +500,13 @@ static int x1205_probe(struct i2c_client
unsigned char sr;
struct rtc_device *rtc;
- dev_dbg(&client->dev, "%s\n", __FUNCTION__);
+ dev_dbg(&client->dev, "%s\n", __func__);
- if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
return -ENODEV;
- }
- if (x1205_validate_client(client) < 0) {
+ if (x1205_validate_client(client) < 0)
return -ENODEV;
- }
dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
_