linux-kernel.vger.kernel.org archive mirror
 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 related	[flat|nested] 3+ messages in thread

* Re: [PATCH][TRIVIAL] mfd: twl6030: Add intermediate cast to uintptr_t before casting to pointer.
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2012-04-26  0:06 UTC (permalink / raw)
  To: Krzysztof Wilczynski
  Cc: Samuel Ortiz, Greg Kroah-Hartman, linux-kernel, trivial

[-- Attachment #1: Type: TEXT/PLAIN, Size: 547 bytes --]

On Thu, 26 Apr 2012, Krzysztof Wilczynski wrote:

> 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

Sigh. Instaed of blindy fixing some random warning, that driver should
be converted to use proper threaded interrupt handlers which already
do the Right Thing.
 
Thanks,

	tglx

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

* Re: [PATCH][TRIVIAL] mfd: twl6030: Add intermediate cast to uintptr_t before casting to pointer.
  2012-04-26  0:06 ` Thomas Gleixner
@ 2012-04-26 14:51   ` Krzysztof Wilczynski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Wilczynski @ 2012-04-26 14:51 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Samuel Ortiz, Greg Kroah-Hartman, linux-kernel, trivial

Hi,

On 26 April 2012 01:06, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Thu, 26 Apr 2012, Krzysztof Wilczynski wrote:
>
>> 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
>
> Sigh. Instaed of blindy fixing some random warning, that driver should
> be converted to use proper threaded interrupt handlers which already
> do the Right Thing.

Thank you for pointing this out to me :)  I was not aware that it has
to be converted to use new API / functionality.  I will most certainly
look how to do this and what is required to do so.

KW

^ 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;
as well as URLs for NNTP newsgroup(s).