Skip to content

Commit

Permalink
[PATCH] remove blk_queue_activity_fn
Browse files Browse the repository at this point in the history
While working on bidi support at struct request level
I have found that blk_queue_activity_fn is actually never used.
The only user is in ide-probe.c with this code:

	/* enable led activity for disk drives only */
	if (drive->media == ide_disk && hwif->led_act)
		blk_queue_activity_fn(q, hwif->led_act, drive);

And led_act is never initialized anywhere.
(Looking back at older kernels it was used in the PPC arch, but was removed around 2.6.18)
Unless it is all for future use off course.
(this patch is against linux-2.6-block.git as off 2006/12/4)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Boaz Harrosh authored and Jens Axboe committed Dec 12, 2006
1 parent 4259cb2 commit 2b02a17
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
12 changes: 0 additions & 12 deletions block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,6 @@ struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev)
}
EXPORT_SYMBOL(blk_get_backing_dev_info);

void blk_queue_activity_fn(request_queue_t *q, activity_fn *fn, void *data)
{
q->activity_fn = fn;
q->activity_data = data;
}
EXPORT_SYMBOL(blk_queue_activity_fn);

/**
* blk_queue_prep_rq - set a prepare_request function for queue
* @q: queue
Expand Down Expand Up @@ -238,8 +231,6 @@ void blk_queue_make_request(request_queue_t * q, make_request_fn * mfn)
* by default assume old behaviour and bounce for any highmem page
*/
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);

blk_queue_activity_fn(q, NULL, NULL);
}

EXPORT_SYMBOL(blk_queue_make_request);
Expand Down Expand Up @@ -2696,9 +2687,6 @@ static inline void add_request(request_queue_t * q, struct request * req)
{
drive_stat_acct(req, req->nr_sectors, 1);

if (q->activity_fn)
q->activity_fn(q->activity_data, rq_data_dir(req));

/*
* elevator indicated where it wants this request to be
* inserted at elevator_merge time
Expand Down
4 changes: 0 additions & 4 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,10 +1000,6 @@ static int ide_init_queue(ide_drive_t *drive)
/* needs drive->queue to be set */
ide_toggle_bounce(drive, 1);

/* enable led activity for disk drives only */
if (drive->media == ide_disk && hwif->led_act)
blk_queue_activity_fn(q, hwif->led_act, drive);

return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ typedef void (unplug_fn) (request_queue_t *);

struct bio_vec;
typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
typedef void (activity_fn) (void *data, int rw);
typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
typedef void (softirq_done_fn)(struct request *);
Expand Down Expand Up @@ -384,7 +383,6 @@ struct request_queue
prep_rq_fn *prep_rq_fn;
unplug_fn *unplug_fn;
merge_bvec_fn *merge_bvec_fn;
activity_fn *activity_fn;
issue_flush_fn *issue_flush_fn;
prepare_flush_fn *prepare_flush_fn;
softirq_done_fn *softirq_done_fn;
Expand All @@ -411,8 +409,6 @@ struct request_queue
*/
void *queuedata;

void *activity_data;

/*
* queue needs bounce pages for pages above this limit
*/
Expand Down Expand Up @@ -677,7 +673,6 @@ extern void blk_sync_queue(struct request_queue *q);
extern void __blk_stop_queue(request_queue_t *q);
extern void blk_run_queue(request_queue_t *);
extern void blk_start_queueing(request_queue_t *);
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
extern int blk_rq_unmap_user(struct request *);
extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
Expand Down
2 changes: 0 additions & 2 deletions include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,6 @@ typedef struct hwif_s {
void *hwif_data; /* extra hwif data */

unsigned dma;

void (*led_act)(void *data, int rw);
} ____cacheline_internodealigned_in_smp ide_hwif_t;

/*
Expand Down

0 comments on commit 2b02a17

Please sign in to comment.