From: Andrew Morton <akpm@osdl.org>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: rddunlap@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] floppy driver cleanup
Date: Thu, 28 Aug 2003 08:59:16 -0700 [thread overview]
Message-ID: <20030828085916.035632ce.akpm@osdl.org> (raw)
In-Reply-To: <16205.58701.762150.49446@gargle.gargle.HOWL>
Mikael Pettersson <mikpe@csd.uu.se> wrote:
>
> 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.)
No, you're not - I also instapuked over that.
diff -puN drivers/block/floppy.c~floppy-more-cleanup drivers/block/floppy.c
--- 25/drivers/block/floppy.c~floppy-more-cleanup 2003-08-27 22:51:16.000000000 -0700
+++ 25-akpm/drivers/block/floppy.c 2003-08-27 22:56:54.000000000 -0700
@@ -1007,9 +1007,9 @@ static void empty(void)
static DECLARE_WORK(floppy_work, NULL, NULL);
-static void schedule_bh(void (*handler) (void *))
+static void schedule_bh(void (*handler) (void))
{
- PREPARE_WORK(&floppy_work, handler, NULL);
+ PREPARE_WORK(&floppy_work, (void (*)(void *))handler, NULL);
schedule_work(&floppy_work);
}
@@ -1799,9 +1799,9 @@ irqreturn_t floppy_interrupt(int irq, vo
max_sensei--;
} while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2 && max_sensei);
}
- if (handler) {
- schedule_bh((void *) handler);
- } else
+ if (handler)
+ schedule_bh(handler);
+ else
FDCS->reset = 1;
is_alive("normal interrupt end");
@@ -2063,7 +2063,7 @@ static int wait_til_done(void (*handler)
{
int ret;
- schedule_bh((void *) handler);
+ schedule_bh(handler);
if (command_status < 2 && NO_SIGNAL) {
DECLARE_WAITQUEUE(wait, current);
@@ -2974,7 +2974,7 @@ static void redo_fd_request(void)
if (TESTF(FD_NEED_TWADDLE))
twaddle();
- schedule_bh((void *) floppy_start);
+ schedule_bh(floppy_start);
#ifdef DEBUGT
debugt("queue fd request");
#endif
@@ -2993,7 +2993,7 @@ static struct cont_t rw_cont = {
static void process_fd_request(void)
{
cont = &rw_cont;
- schedule_bh((void *) redo_fd_request);
+ schedule_bh(redo_fd_request);
}
static void do_fd_request(request_queue_t * q)
@@ -3057,9 +3057,9 @@ static void reset_intr(void)
static struct cont_t reset_cont = {
.interrupt = reset_intr,
- . redo = success_and_wakeup,
- . error = generic_failure,
- . done = generic_done
+ .redo = success_and_wakeup,
+ .error = generic_failure,
+ .done = generic_done
};
static int user_reset_fdc(int drive, int arg, int interruptible)
_
prev parent reply other threads:[~2003-08-28 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-28 5:41 Randy.Dunlap
2003-08-28 11:19 ` Mikael Pettersson
2003-08-28 15:59 ` Andrew Morton [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030828085916.035632ce.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=rddunlap@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®