* [PATCH 1/1] regulator: Fix incorrect casting in tps6230-regulator.c
@ 2012-09-10 20:53 Luis Gonzalez Fernandez
2012-09-11 0:09 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Luis Gonzalez Fernandez @ 2012-09-10 20:53 UTC (permalink / raw)
To: lrg, broonie; +Cc: linux-kernel, Luis Gonzalez Fernandez
linux-3.6/drivers/regulator/tps62360-regulator.c: In function ‘tps62360_probe’:
linux-3.6/drivers/regulator/tps62360-regulator.c:364:13: warning: cast from poi$
Fix incorrect cast in tps62360_probe() function.
Signed-off-by: Luis Gonzalez Fernandez <luisgf@gmail.com>
---
drivers/regulator/tps62360-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index 68729a7..02ff11c 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -361,7 +361,7 @@ static int __devinit tps62360_probe(struct i2c_client *client,
dev_err(&client->dev, "Error: No device match found\n");
return -ENODEV;
}
- chip_id = (int)match->data;
+ chip_id = *((int *)match->data);
if (!pdata)
pdata = of_get_tps62360_platform_data(&client->dev);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] regulator: Fix incorrect casting in tps6230-regulator.c
2012-09-10 20:53 [PATCH 1/1] regulator: Fix incorrect casting in tps6230-regulator.c Luis Gonzalez Fernandez
@ 2012-09-11 0:09 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-09-11 0:09 UTC (permalink / raw)
To: Luis Gonzalez Fernandez; +Cc: lrg, linux-kernel
On Mon, Sep 10, 2012 at 10:53:29PM +0200, Luis Gonzalez Fernandez wrote:
> linux-3.6/drivers/regulator/tps62360-regulator.c: In function ‘tps62360_probe’:
> linux-3.6/drivers/regulator/tps62360-regulator.c:364:13: warning: cast from poi$
>
> Fix incorrect cast in tps62360_probe() function.
This fix isn't at all obvious and the warning doesn't show up for me.
In general you need to supply some words explaining what you're doing,
simply pasting a copy of an error message doesn't explain why your new
code is good.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-11 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-10 20:53 [PATCH 1/1] regulator: Fix incorrect casting in tps6230-regulator.c Luis Gonzalez Fernandez
2012-09-11 0:09 ` Mark Brown
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).