LKML Archive on
help / color / mirror / Atom feed
From: Al Viro <>
To: Rusty Russell <>
Cc: Linus Torvalds <>,, Jeff Garzik <>
Subject: Re: [PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer
Date: Mon, 4 Feb 2008 14:57:37 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Feb 04, 2008 at 11:19:44PM +1100, Rusty Russell wrote:
> This patch lets timer callback functions have their natural type
> (ie. exactly match the data pointer type); it allows the old "unsigned
> long data" type as well.
> Downside: if you use the old "unsigned long" callback type, you won't
> get a warning if your data is not an unsigned long, due to the cast.

No.  There's much saner way to do that and it does not involve any gccisms
at all.  I'd posted such patches quite a while ago; normal C constructs
are quite sufficient, TYVM.

We don't _need_ that 'allow the old "unsigned long data"' junk.  There's
not enough users of setup_timer() to excuse it; other instances can and
should be converted to setup_timer() one by one, getting their types switched
to sanity as we go.

Let's not mix type safety with that ugliness, please.

  reply	other threads:[~2008-02-04 14:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 12:11 [PATCH 0/5] typesafe callbacks Rusty Russell
2008-02-04 12:14 ` [PATCH 1/5] cast_if_type: allow macros functions which take more than one type Rusty Russell
2008-02-04 12:16   ` [PATCH 2/5] typesafe: Convert stop_machine Rusty Russell
2008-02-04 12:17     ` [PATCH 3/5] typesafe: kthread_create and kthread_run Rusty Russell
2008-02-04 12:18       ` [PATCH 4/5] typesafe: request_irq and devm_request_irq Rusty Russell
2008-02-04 12:19         ` [PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer Rusty Russell
2008-02-04 14:57           ` Al Viro [this message]
2008-02-05  3:41             ` Rusty Russell
2008-03-05  2:55               ` Rusty Russell
2008-03-06 10:40                 ` Al Viro
2008-03-10  1:07                   ` Rusty Russell
2008-03-10  2:03                     ` Al Viro
2008-03-10  3:42                       ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).