All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: zoro <long17.cool@163.com>
Cc: kbuild-all@01.org, a.zummo@towertech.it,
	alexandre.belloni@bootlin.com, robh+dt@kernel.org,
	mark.rutland@arm.com, linux-rtc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	zoro <long17.cool@163.com>
Subject: [PATCH] rtc: sd3078: fix ptr_ret.cocci warnings
Date: Sat, 10 Nov 2018 23:57:20 +0800	[thread overview]
Message-ID: <20181110155720.GA122918@ivb43> (raw)
In-Reply-To: <1541839433-28811-2-git-send-email-long17.cool@163.com>

From: kbuild test robot <fengguang.wu@intel.com>

drivers/rtc/rtc-sd3078.c:248:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e231edadd7fa ("rtc: sd3078: new driver.")
CC: zoro <long17.cool@163.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/zoro/dt-bindings-define-vendor-prefix-for-whwave-Inc/20181110-205048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next

 rtc-sd3078.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/rtc/rtc-sd3078.c
+++ b/drivers/rtc/rtc-sd3078.c
@@ -245,10 +245,7 @@ static int sd3078_probe(struct i2c_clien
 			sd3078_driver.driver.name,
 			&sd3078_rtc_ops, THIS_MODULE);
 
-	if (IS_ERR(sd3078->rtc))
-		return PTR_ERR(sd3078->rtc);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(sd3078->rtc);
 }
 
 static int sd3078_remove(struct i2c_client *client)

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, a.zummo@towertech.it,
	alexandre.belloni@bootlin.com, robh+dt@kernel.org,
	mark.rutland@arm.com, linux-rtc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	zoro <long17.cool@163.com>
Subject: [PATCH] rtc: sd3078: fix ptr_ret.cocci warnings
Date: Sat, 10 Nov 2018 23:57:20 +0800	[thread overview]
Message-ID: <20181110155720.GA122918@ivb43> (raw)
In-Reply-To: <1541839433-28811-2-git-send-email-long17.cool@163.com>

From: kbuild test robot <fengguang.wu@intel.com>

drivers/rtc/rtc-sd3078.c:248:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e231edadd7fa ("rtc: sd3078: new driver.")
CC: zoro <long17.cool@163.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/zoro/dt-bindings-define-vendor-prefix-for-whwave-Inc/20181110-205048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next

 rtc-sd3078.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/rtc/rtc-sd3078.c
+++ b/drivers/rtc/rtc-sd3078.c
@@ -245,10 +245,7 @@ static int sd3078_probe(struct i2c_clien
 			sd3078_driver.driver.name,
 			&sd3078_rtc_ops, THIS_MODULE);
 
-	if (IS_ERR(sd3078->rtc))
-		return PTR_ERR(sd3078->rtc);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(sd3078->rtc);
 }
 
 static int sd3078_remove(struct i2c_client *client)

  parent reply	other threads:[~2018-11-10 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10  8:43 [PATCH 1/3] dt-bindings: define vendor prefix for whwave, Inc zoro
2018-11-10  8:43 ` [PATCH 2/3] rtc: sd3078: new driver zoro
2018-11-10 12:41   ` Alexandre Belloni
2018-11-10 15:57   ` kbuild test robot
2018-11-10 15:57     ` kbuild test robot
2018-11-10 15:57   ` kbuild test robot [this message]
2018-11-10 15:57     ` [PATCH] rtc: sd3078: fix ptr_ret.cocci warnings kbuild test robot
2018-11-10  8:43 ` [PATCH 3/3] dt-bindings: rtc: sd3078: add device tree documentation zoro
2018-11-10 12:19 ` [PATCH 1/3] dt-bindings: define vendor prefix for whwave, Inc Alexandre Belloni
2018-11-10 12:33   ` 

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181110155720.GA122918@ivb43 \
    --to=fengguang.wu@intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=long17.cool@163.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.