From: Andrew Morton WARNING: __func__ should be used instead of gcc specific __FUNCTION__ #100: FILE: drivers/rtc/rtc-pcf8563.c:255: + dev_dbg(&client->dev, "%s\n", __FUNCTION__); ERROR: do not use assignment in if condition #120: FILE: drivers/rtc/rtc-pcf8563.c:260: + if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL))) WARNING: line over 80 characters #141: FILE: drivers/rtc/rtc-pcf8563.c:271: + pcf8563->rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev, total: 1 errors, 2 warnings, 180 lines checked ./patches/rtc-pcf8563-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 Cc: David Brownell Signed-off-by: Andrew Morton --- drivers/rtc/rtc-pcf8563.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-new-style-conversion-checkpatch-fixes drivers/rtc/rtc-pcf8563.c --- a/drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-new-style-conversion-checkpatch-fixes +++ a/drivers/rtc/rtc-pcf8563.c @@ -252,12 +252,13 @@ static int pcf8563_probe(struct i2c_clie int err = 0; - dev_dbg(&client->dev, "%s\n", __FUNCTION__); + dev_dbg(&client->dev, "%s\n", __func__); if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) return -ENODEV; - if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL))) + pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL)); + if (!pcf8563) return -ENOMEM; /* Verify the chip is really an PCF8563 */ @@ -268,8 +269,8 @@ static int pcf8563_probe(struct i2c_clie dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); - pcf8563->rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev, - &pcf8563_rtc_ops, THIS_MODULE); + pcf8563->rtc = rtc_device_register(pcf8563_driver.driver.name, + &client->dev, &pcf8563_rtc_ops, THIS_MODULE); if (IS_ERR(pcf8563->rtc)) { err = PTR_ERR(pcf8563->rtc); _