On 14 November 2018 at 17:02, Christoph Hellwig <hch@xxxxxx> wrote: > Merge three functions initializing the queue into a single one, and drop > an unused argument for it. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > drivers/mmc/core/block.c | 2 +- > drivers/mmc/core/queue.c | 86 ++++++++++++++-------------------------- > drivers/mmc/core/queue.h | 3 +- > 3 files changed, 32 insertions(+), 59 deletions(-) > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c > index c35b5b08bb33..27606e1382e5 100644 > --- a/drivers/mmc/core/block.c > +++ b/drivers/mmc/core/block.c > @@ -2334,7 +2334,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, > INIT_LIST_HEAD(&md->rpmbs); > md->usage = 1; > > - ret = mmc_init_queue(&md->queue, card, &md->lock, subname); > + ret = mmc_init_queue(&md->queue, card, &md->lock); > if (ret) > goto err_putdisk; > > diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c > index 6edffeed9953..37617fb1f9de 100644 > --- a/drivers/mmc/core/queue.c > +++ b/drivers/mmc/core/queue.c > @@ -378,14 +378,38 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card) > init_waitqueue_head(&mq->wait); > } > > -static int mmc_mq_init_queue(struct mmc_queue *mq, int q_depth, > - const struct blk_mq_ops *mq_ops, spinlock_t *lock) > +/* Set queue depth to get a reasonable value for q->nr_requests */ > +#define MMC_QUEUE_DEPTH 64 > + > +/** > + * mmc_init_queue - initialise a queue structure. > + * @mq: mmc queue > + * @card: mmc card to attach this queue > + * @lock: queue lock > + * @subname: partition subname Drop subname :-) > + * > + * Initialise a MMC card request queue. > + */ > +int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, > + spinlock_t *lock) > { [...] A very nice cleanup, thanks! Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Kind regards Uffe