From: SeongJae Park <sj38.park@gmail.com>
To: sameo@linux.intel.com, lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
patches@opensource.wolfsonmicro.com,
SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH] drivers/mfd: fix pointer-integer size mismatch warnings
Date: Tue, 4 Feb 2014 15:42:23 +0900 [thread overview]
Message-ID: <1391496143-6660-1-git-send-email-sj38.park@gmail.com> (raw)
Fix the pointer-integer size mismatch warnings below:
drivers/mfd/wm8994-core.c: In function ‘wm8994_i2c_probe’:
mfd/wm8994-core.c:639:19: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
wm8994->type = (int)of_id->data;
^
drivers/mfd/max8997.c: In function ‘max8997_i2c_get_driver_data’:
drivers/mfd/max8997.c:173:10: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
return (int)match->data;
^
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
drivers/mfd/max8997.c | 2 +-
drivers/mfd/wm8994-core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index be88a3b..768bcb1 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -170,7 +170,7 @@ static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c,
if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
const struct of_device_id *match;
match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node);
- return (int)match->data;
+ return (int)(long)match->data;
}
return (int)id->driver_data;
}
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index ba04f1b..1b25335 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -636,7 +636,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
if (i2c->dev.of_node) {
of_id = of_match_device(wm8994_of_match, &i2c->dev);
if (of_id)
- wm8994->type = (int)of_id->data;
+ wm8994->type = (int)(long)of_id->data;
} else {
wm8994->type = id->driver_data;
}
--
1.8.3.2
next reply other threads:[~2014-02-04 6:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 6:42 SeongJae Park [this message]
2014-02-04 9:03 ` [PATCH] drivers/mfd: fix pointer-integer size mismatch warnings Lee Jones
2014-02-04 9:07 ` SeongJae Park
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=1391496143-6660-1-git-send-email-sj38.park@gmail.com \
--to=sj38.park@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.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