* [PATCH] regulator: fan53555: fix wrong cast in probe
@ 2014-09-17 11:21 Heiko Stübner
2014-09-17 16:49 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Stübner @ 2014-09-17 11:21 UTC (permalink / raw)
To: broonie; +Cc: linux-kernel, linux-rockchip
The vendor-id gathered from the dt match-data was cast to int but assigned
to an unsigned long, producing warnings on at least sparc, like
drivers/regulator/fan53555.c: In function 'fan53555_regulator_probe':
>> drivers/regulator/fan53555.c:373:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
di->vendor = (int) match->data;
Fix this by using an appropriate cast.
Reported-by: kbuild test robot
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/regulator/fan53555.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index f2f5535..6ca6e26 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
if (!match)
return -ENODEV;
- di->vendor = (int) match->data;
+ di->vendor = (unsigned long) match->data;
} else {
/* if no ramp constraint set, get the pdata ramp_delay */
if (!di->regulator->constraints.ramp_delay) {
--
2.0.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: fan53555: fix wrong cast in probe
2014-09-17 11:21 [PATCH] regulator: fan53555: fix wrong cast in probe Heiko Stübner
@ 2014-09-17 16:49 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-09-17 16:49 UTC (permalink / raw)
To: Heiko Stübner; +Cc: linux-kernel, linux-rockchip
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
On Wed, Sep 17, 2014 at 01:21:48PM +0200, Heiko Stübner wrote:
> The vendor-id gathered from the dt match-data was cast to int but assigned
> to an unsigned long, producing warnings on at least sparc, like
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-17 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17 11:21 [PATCH] regulator: fan53555: fix wrong cast in probe Heiko Stübner
2014-09-17 16:49 ` Mark Brown
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®