mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: sathyanarayanan.kuppuswamy@linux.intel.com
Cc: kbuild-all@01.org, peda@axentia.se, linux-kernel@vger.kernel.org,
	sathyaosid@gmail.com,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@linux.intel.com>
Subject: [PATCH] mux: fix err_cast.cocci warnings
Date: Sun, 9 Jul 2017 03:52:27 +0800	[thread overview]
Message-ID: <20170708195227.GA79324@lkp-wsx02> (raw)
In-Reply-To: <c5b64f76ed8e737ece843249c12b09032fc61cb6.1499464980.git.sathyanarayanan.kuppuswamy@linux.intel.com>

drivers/mux/mux-core.c:491:9-16: WARNING: ERR_CAST can be used with mux_chip


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

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

Fixes: 1203d8a531ed ("mux: Add new API to get mux_control ref by device name.")
CC: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 mux-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mux/mux-core.c
+++ b/drivers/mux/mux-core.c
@@ -488,7 +488,7 @@ struct mux_control *mux_control_get_by_i
 	mux_chip = mux_chip_get_by_index(devname, chip_index);
 
 	if (IS_ERR(mux_chip))
-		return ERR_PTR(PTR_ERR(mux_chip));
+		return ERR_CAST(mux_chip);
 
 	if (ctrl_index >= mux_chip->controllers) {
 		dev_err(&mux_chip->dev,

  reply	other threads:[~2017-07-08 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 19:52 [PATCH v1 1/1] mux: Add new API to get mux_control ref by device name kbuild test robot
2017-07-07 22:03 ` sathyanarayanan.kuppuswamy
2017-07-08 19:52   ` kbuild test robot [this message]
2017-07-08 21:12   ` Peter Rosin
2017-07-08 21:26     ` Andy Shevchenko
2017-07-08 23:28       ` Kuppuswamy, Sathyanarayanan
2017-07-08 23:24     ` Kuppuswamy, Sathyanarayanan
2017-07-10 10:07       ` Peter Rosin
2017-07-10 21:37         ` sathyanarayanan kuppuswamy

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=20170708195227.GA79324@lkp-wsx02 \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sathyaosid@gmail.com \
    /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

all inboxes | Powered by JetHome®