[lkml]   [2003]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] floppy driver cleanup
Randy.Dunlap writes:
> -static void schedule_bh( void (*handler)(void*) )
> +static void schedule_bh(void (*handler) (void *))
> - schedule_bh( (void *)(void *) handler);
> + schedule_bh((void *) handler);
> - schedule_bh((void *)(void *)handler);
> + schedule_bh((void *) handler);
> - schedule_bh( (void *)(void *) floppy_start);
> + schedule_bh((void *) floppy_start);
> - schedule_bh( (void *)(void *) redo_fd_request);
> + schedule_bh((void *) redo_fd_request);

Am I the only one having problems with code like this?
(Not Randy's, the original.)

1. void* and function pointers are not interchangeable.
The casts should be to (void(*)(void*)) not (void*).

2. If shedule_bh() causes handler to be invoked as a
(void(*)(void*)), then handler had better point to a
function with exactly that prototype and nothing else.
Fixing this also eliminates the need for the casts.

IMO changing whitespace while these issues remain is just
a waste of time.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:48    [W:0.085 / U:5.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site