lkml.org 
[lkml]   [2008]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer
Date
On Monday 10 March 2008 13:03:14 Al Viro wrote:
> On Mon, Mar 10, 2008 at 12:07:19PM +1100, Rusty Russell wrote:
> > Worst, I can't see a way to apply your technique in general, for
> > non-void-returning functions (eg. interrupt handlers).
>
> Interrupt handlers are easy. Just switch irqreturn_t from into to
> struct {int x;}, adjust the rest of irqreturn.h accordingly, add
> extern void want_irqreturn_t(irqreturn_t);
> then replace 0 ? (f)(x) : (void)0 with want_irqreturn_t((f)(x)) in the
> expression under sizeof and we are all set (assuming Jeff's elimination
> of irq number in place by then or done in parallel).

Hmm, I was hoping we'd kill irqreturn_t some day: I don't think 2.4
compatibility is worth much any more.

That means doing similar things for stop_machine and kthread_create (just from
looking at this patch series).

The benefits of natural-typed callback args drops if the return type pays the
price.

Cheers,
Rusty.



\
 
 \ /
  Last update: 2008-03-10 04:47    [W:0.035 / U:1.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site