mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][TRIVIAL] mfd: twl6030: Add intermediate cast to uintptr_t before casting to pointer.
@ 2012-04-25 23:32 Krzysztof Wilczynski
  2012-04-26  0:06 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Wilczynski @ 2012-04-25 23:32 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Greg Kroah-Hartman, linux-kernel, trivial

This is to address the following warning during compilation time:

  drivers/mfd/twl6030-irq.c: In function ‘twl6030_init_irq’:
  drivers/mfd/twl6030-irq.c:398: warning: cast to pointer from integer of different size
  drivers/mfd/twl6030-irq.c:415: warning: cast to pointer from integer of different size

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
---
 drivers/mfd/twl6030-irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index b76902f..ddaed2d 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -395,7 +395,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
 	for (i = irq_base; i < irq_end; i++) {
 		irq_set_chip_and_handler(i, &twl6030_irq_chip,
 					 handle_simple_irq);
-		irq_set_chip_data(i, (void *)irq_num);
+		irq_set_chip_data(i, (void *)(uintptr_t)irq_num);
 		activate_irq(i);
 	}
 
@@ -412,7 +412,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
 		goto fail_irq;
 	}
 
-	task = kthread_run(twl6030_irq_thread, (void *)irq_num, "twl6030-irq");
+	task = kthread_run(twl6030_irq_thread, (void *)(uintptr_t)irq_num, "twl6030-irq");
 	if (IS_ERR(task)) {
 		dev_err(dev, "could not create irq %d thread!\n", irq_num);
 		status = PTR_ERR(task);
-- 
1.7.7.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-26 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 23:32 [PATCH][TRIVIAL] mfd: twl6030: Add intermediate cast to uintptr_t before casting to pointer Krzysztof Wilczynski
2012-04-26  0:06 ` Thomas Gleixner
2012-04-26 14:51   ` Krzysztof Wilczynski

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®