From: kbuild test robot <lkp@intel.com>
To: eajames.ibm@gmail.com
Cc: kbuild-all@01.org, linux@roeck-us.net,
devicetree@vger.kernel.org, jdelvare@suse.com, corbet@lwn.net,
linux-doc@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
mark.rutland@arm.com, robh+dt@kernel.org, wsa@the-dreams.de,
andrew@aj.id.au, joel@jms.id.au, benh@kernel.crashing.org,
"Edward A. James" <eajames@us.ibm.com>
Subject: [PATCH] hwmon: occ: fix err_cast.cocci warnings
Date: Thu, 12 Jan 2017 15:39:56 +0800 [thread overview]
Message-ID: <20170112073956.GA29782@lkp-ib03.lkp.intel.com> (raw)
In-Reply-To: <1484158237-10014-3-git-send-email-eajames.ibm@gmail.com>
drivers/hwmon/occ/occ_sysfs.c:265:9-16: WARNING: ERR_CAST can be used with hwmon -> dev
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
CC: Edward A. James <eajames@us.ibm.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
occ_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/occ/occ_sysfs.c
+++ b/drivers/hwmon/occ/occ_sysfs.c
@@ -262,7 +262,7 @@ struct occ_sysfs *occ_sysfs_start(struct
if (IS_ERR(hwmon->dev)) {
dev_err(dev, "cannot register hwmon device %s: %ld\n",
hwmon->hwmon_name, PTR_ERR(hwmon->dev));
- return ERR_PTR(PTR_ERR(hwmon->dev));
+ return ERR_CAST(hwmon->dev);
}
return hwmon;
next prev parent reply other threads:[~2017-01-12 7:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 18:10 [PATCH linux v2 0/6] drivers: hwmon: Add On-Chip Controller driver eajames.ibm
2017-01-11 18:10 ` [PATCH linux v2 2/6] hwmon: occ: Add sysfs interface eajames.ibm
2017-01-12 7:39 ` kbuild test robot [this message]
2017-01-12 7:39 ` kbuild test robot
2017-01-15 18:18 ` Guenter Roeck
2017-01-11 18:10 ` [PATCH linux v2 3/6] hwmon: occ: Add I2C transport implementation for SCOM operations eajames.ibm
2017-01-11 18:10 ` [PATCH linux v2 4/6] hwmon: occ: Add callbacks for parsing P8 OCC datastructures eajames.ibm
2017-01-11 18:10 ` [PATCH linux v2 5/6] hwmon: occ: Add hwmon implementation for the P8 OCC eajames.ibm
2017-01-15 18:15 ` Guenter Roeck
[not found] ` <1484158237-10014-6-git-send-email-eajames.ibm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-15 18:34 ` Guenter Roeck
2017-01-11 18:10 ` [PATCH linux v2 6/6] hwmon: occ: Add callbacks for parsing P9 OCC datastructures eajames.ibm
[not found] ` <1484158237-10014-1-git-send-email-eajames.ibm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-11 18:10 ` [PATCH linux v2 1/6] hwmon: Add core On-Chip Controller support for POWER CPUs eajames.ibm-Re5JQEeQqe8AvxtiuMwx3w
2017-01-12 9:56 ` [PATCH linux v2 0/6] drivers: hwmon: Add On-Chip Controller driver Wolfram Sang
2017-01-15 18:35 ` Guenter Roeck
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=20170112073956.GA29782@lkp-ib03.lkp.intel.com \
--to=lkp@intel.com \
--cc=andrew@aj.id.au \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=eajames.ibm@gmail.com \
--cc=eajames@us.ibm.com \
--cc=jdelvare@suse.com \
--cc=joel@jms.id.au \
--cc=kbuild-all@01.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).