public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix hpet_(un)register_irq_handler() again for emulation
@ 2009-06-30 11:41 Jan Beulich
  2009-06-30 17:20 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2009-06-30 11:41 UTC (permalink / raw)
  To: dhowells, linux-kernel

Commit 32fa458688fa2e68bc433929b2d4941eef7efe39 didn't really succeed
in what it was trying to do - depending on the compiler version, the
"statement with no effect" warnings still exist.

Since hpet_register_irq_handler() has its return value used, it can be
restored to expand to a plain 0 again.

For hpet_unregister_irq_handler(), an expression the effective of is
"void" ought to be used instead.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

---
 drivers/char/rtc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.31-rc1/drivers/char/rtc.c	2009-03-24 00:12:14.000000000 +0100
+++ 2.6.31-rc1-rtc-warnings/drivers/char/rtc.c	2009-06-24 16:30:02.000000000 +0200
@@ -112,8 +112,8 @@ static int rtc_has_irq = 1;
 #define hpet_set_rtc_irq_bit(arg)		0
 #define hpet_rtc_timer_init()			do { } while (0)
 #define hpet_rtc_dropped_irq()			0
-#define hpet_register_irq_handler(h)		({ 0; })
-#define hpet_unregister_irq_handler(h)		({ 0; })
+#define hpet_register_irq_handler(h)		0
+#define hpet_unregister_irq_handler(h)		((void)0)
 #ifdef RTC_IRQ
 static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 {




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

* Re: [PATCH] Fix hpet_(un)register_irq_handler() again for emulation
  2009-06-30 11:41 [PATCH] Fix hpet_(un)register_irq_handler() again for emulation Jan Beulich
@ 2009-06-30 17:20 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2009-06-30 17:20 UTC (permalink / raw)
  To: Jan Beulich; +Cc: dhowells, linux-kernel

Jan Beulich <JBeulich@novell.com> wrote:

> For hpet_unregister_irq_handler(), an expression the effective of is
> "void" ought to be used instead.

Inline functions should probably be used instead.

David

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

end of thread, other threads:[~2009-06-30 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 11:41 [PATCH] Fix hpet_(un)register_irq_handler() again for emulation Jan Beulich
2009-06-30 17:20 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox