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

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

 



On Wed, Jan 10 2007, Kiyoshi Ueda wrote:
> +static int end_request_callback(void *arg)
> +{
> +	struct request *req = (struct request *)arg;
> +
> +	add_disk_randomness(req->rq_disk);
> +	blkdev_dequeue_request(req);
> +
> +	return 0;
> +}

This is bad, don't pass void * around.

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

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux