From: Viresh Kumar <viresh.kumar@linaro.org>
To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org,
anton@enomsg.org
Cc: linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 05/15] power-supply: Drop unnecessary typecasts
Date: Thu, 4 Sep 2014 17:31:26 +0530 [thread overview]
Message-ID: <0ac40f9754bce63d88f6ee14948802ca9a7878d7.1409831636.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <2eacd908a8094887cc1796f75ae0513be8a3e36d.1409831636.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1409831636.git.viresh.kumar@linaro.org>
Typecast from 'void *' to any other pointer type falls under implicit typecasts
category and so doesn't require explicit typecasts. Drop them.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/power/power_supply_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 414384a..71d00ec 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -58,7 +58,7 @@ static bool __power_supply_is_supplied_by(struct power_supply *supplier,
static int __power_supply_changed_work(struct device *dev, void *data)
{
- struct power_supply *psy = (struct power_supply *)data;
+ struct power_supply *psy = data;
struct power_supply *pst = dev_get_drvdata(dev);
if (__power_supply_is_supplied_by(psy, pst)) {
@@ -119,7 +119,7 @@ EXPORT_SYMBOL_GPL(power_supply_changed);
static int __power_supply_populate_supplied_from(struct device *dev,
void *data)
{
- struct power_supply *psy = (struct power_supply *)data;
+ struct power_supply *psy = data;
struct power_supply *epsy = dev_get_drvdata(dev);
struct device_node *np;
int i = 0;
@@ -158,7 +158,7 @@ static int power_supply_populate_supplied_from(struct power_supply *psy)
static int __power_supply_find_supply_from_node(struct device *dev,
void *data)
{
- struct device_node *np = (struct device_node *)data;
+ struct device_node *np = data;
struct power_supply *epsy = dev_get_drvdata(dev);
/* return error breaks out of class_for_each_device loop */
@@ -257,7 +257,7 @@ static inline int power_supply_check_supplies(struct power_supply *psy)
static int __power_supply_am_i_supplied(struct device *dev, void *data)
{
union power_supply_propval ret = {0,};
- struct power_supply *psy = (struct power_supply *)data;
+ struct power_supply *psy = data;
struct power_supply *epsy = dev_get_drvdata(dev);
if (__power_supply_is_supplied_by(epsy, psy))
--
2.0.3.693.g996b0fd
next prev parent reply other threads:[~2014-09-04 12:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 12:00 [PATCH 00/15] power_supply: Fixes & cleanups Viresh Kumar
2014-09-04 12:01 ` [PATCH 01/15] power-supply: Don't over-allocate memory for "supplied-from" array Viresh Kumar
2014-09-04 12:01 ` [PATCH 02/15] power-supply: Return early if "power-supplies" property isn't valid Viresh Kumar
2014-09-04 12:01 ` [PATCH 03/15] Documentation: Charger Manager: Fix spelling mistakes Viresh Kumar
2014-09-04 12:01 ` [PATCH 04/15] power-supply: Forward declare structs together Viresh Kumar
2014-09-04 12:01 ` Viresh Kumar [this message]
2014-09-04 12:01 ` [PATCH 06/15] power-supply: Use 'break' instead of 'continue' to end loop Viresh Kumar
2014-09-04 12:01 ` [PATCH 07/15] power-supply: Rearrange code to remove duplicate lines Viresh Kumar
2014-09-04 12:01 ` [PATCH 08/15] power-supply: Propagate error returned by power_supply_find_supply_from_node() Viresh Kumar
2014-09-04 12:01 ` [PATCH 09/15] power-supply: Don't return -EINVAL from __power_supply_find_supply_from_node() Viresh Kumar
2014-09-04 12:01 ` [PATCH 10/15] power-supply: Drop useless 'if (ret.intval)' statements Viresh Kumar
2014-09-04 12:01 ` [PATCH 11/15] power-supply: Mark 'if' blocks in power_supply_changed_work() with 'likely' Viresh Kumar
2014-09-04 12:01 ` [PATCH 12/15] power-supply: Use PTR_ERR_OR_ZERO() routine Viresh Kumar
2014-09-04 12:01 ` [PATCH 13/15] power-supply: Check for failures only when we can fail Viresh Kumar
2014-09-04 12:01 ` [PATCH 14/15] power-supply: Avoid unnecessary 'goto' statements Viresh Kumar
2014-09-04 12:01 ` [PATCH 15/15] power_supply: Don't iterate over devices to return -EPROBE_DEFER Viresh Kumar
2014-10-01 3:19 ` [PATCH 00/15] power_supply: Fixes & cleanups Viresh Kumar
2014-10-01 15:08 ` Sebastian Reichel
2014-10-02 5:26 ` Viresh Kumar
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=0ac40f9754bce63d88f6ee14948802ca9a7878d7.1409831636.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=anton@enomsg.org \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@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 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).