From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] i2c: fix ptr_ret.cocci warnings
Date: Thu, 13 Feb 2020 18:10:41 +0800 [thread overview]
Message-ID: <20200213101038.GA13164@9560152b1213> (raw)
In-Reply-To: <20200210172929.6001-2-wsa+renesas@sang-engineering.com>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
From: kbuild test robot <lkp@intel.com>
drivers/i2c/i2c-core-smbus.c:714: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: b0497a4dfd24 ("i2c: convert SMBus alert setup function to return an ERRPTR")
CC: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---
url: https://github.com/0day-ci/linux/commits/Wolfram-Sang/i2c-updates-to-SMBus-alert-setup/20200213-051237
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
i2c-core-smbus.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/i2c/i2c-core-smbus.c
+++ b/drivers/i2c/i2c-core-smbus.c
@@ -711,10 +711,7 @@ int of_i2c_setup_smbus_alert(struct i2c_
return irq;
client = i2c_install_smbus_alert(adapter, NULL);
- if (IS_ERR(client))
- return PTR_ERR(client);
-
- return 0;
+ return PTR_ERR_OR_ZERO(client);
}
EXPORT_SYMBOL_GPL(of_i2c_setup_smbus_alert);
#endif
next prev parent reply other threads:[~2020-02-13 10:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 17:29 [PATCH 0/3] i2c: updates to SMBus alert setup Wolfram Sang
2020-02-10 17:29 ` [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Wolfram Sang
2020-02-13 10:10 ` kbuild test robot
2020-02-13 10:10 ` kbuild test robot [this message]
2020-02-15 6:20 ` Jean Delvare
2020-02-15 6:20 ` Jean Delvare
2020-02-15 6:50 ` Wolfram Sang
2020-02-15 8:11 ` Jean Delvare
2020-02-17 7:58 ` Robert Richter
2020-02-17 7:58 ` Robert Richter
2020-02-17 8:17 ` Wolfram Sang
2020-02-17 9:14 ` Luca Ceresoli
2020-02-17 10:00 ` Robert Richter
2020-02-17 10:00 ` Robert Richter
2020-02-17 13:29 ` Wolfram Sang
2020-02-10 17:29 ` [PATCH 2/3] i2c: rename of_i2c_setup_smbus_alert() to keep in sync Wolfram Sang
2020-02-10 17:29 ` [PATCH 3/3] i2c: smbus: remove outdated references to irq level triggers Wolfram Sang
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=20200213101038.GA13164@9560152b1213 \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.