Re: [RFC PATCH 3/3] blk_end_request: caller change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

On Thu, 11 Jan 2007 09:34:31 +0100, Jens Axboe <[email protected]> wrote:
> > +static int cdrom_newpc_intr_dma_callback(void *arg)
> > +{
> > +	void **argv = (void **)arg;
> > +	struct request *rq = (struct request *)*argv++;
> > +	ide_drive_t *drive = (ide_drive_t *)argv++;
> > +	spinlock_t *ide_lock = (spinlock_t *)argv;
> > +
> > +	rq->data_len = 0;
> > +
> > +	cdrom_newpc_intr_callback_common(rq, drive, ide_lock);
> > +
> > +	return 0;
> > +}
> 
> And this is why, down right horrible. The callback should be correctly
> typed, pass down a request pointer ALWAYS.

OK.  I think everything such callbacks need can be obtained through
struct request.  (e.g. ide_drive_t can get by rq->q->queuedata and
ide_lock can get by rq->q->queue_lock.)
So I'll change the callback to pass a pointer to the request
instead of void *.

Thanks,
Kiyoshi Ueda

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux