From patchwork Thu Sep 19 17:20:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Grundler X-Patchwork-Id: 2912781 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9FD05BFF05 for ; Thu, 19 Sep 2013 17:21:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71022202EB for ; Thu, 19 Sep 2013 17:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 532CC202C8 for ; Thu, 19 Sep 2013 17:21:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034Ab3ISRVM (ORCPT ); Thu, 19 Sep 2013 13:21:12 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:35484 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035Ab3ISRVL (ORCPT ); Thu, 19 Sep 2013 13:21:11 -0400 Received: by mail-pd0-f175.google.com with SMTP id q10so8625131pdj.6 for ; Thu, 19 Sep 2013 10:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=xYi6WNNqPUGFBWMoUGU9nLyCe5wzhJeZWstf3ueodf8=; b=I6qg8LejwaupyzCCgU50iqIJj55YdkVSSQnk/hYyFLzMe9sA06ScuYztKn7dqi1mKr oMhjRY26Ajz7Eub56jcO2+fJGRsrfHxgyQIyd8zrKA/ny7mt+0z4si8qxdSSpmQNKq5X bo2MYm/XpU+psPffsXC7ml69IWA7rA6RXj+Hg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xYi6WNNqPUGFBWMoUGU9nLyCe5wzhJeZWstf3ueodf8=; b=hWql5DHG7kwWtfyiNx7gq/J9f3kKLSs/2zdTUQAiLCKBpfnmEbqPDytbq57nzO3g+K u+JWuK7OYNNppA2Xm1e0XxuJD+El5hi2+/HJbuWHw8CPMY7URktEBE+7VoftZTg2NHlN eOtT3FHoHxU4wwzHcROQnsFfvZt4yW0i8RAMMqPV8yJxCk11Wifpox+8VdzV2yFuUrFv dmOIRdh0aXmeyVcxAevvmKj9d7mb+4khCQy+uH1DW2dSKLfOMwqVDl5eFnc5JFy5tuMx Al+LZLwP05N99DMChHHW6I75BzmaAPiltVrX2vokKtXO+b69qKZk9t/d8cZT7yhcO02K +AoA== X-Gm-Message-State: ALoCoQkC0oPDy/OrCLicoOo5B4hNQV4dnVYZo8d7jekwbjkO7ZEsR6jZBnW3Gt0RcpeVlCPnOEil X-Received: by 10.66.156.229 with SMTP id wh5mr4005694pab.156.1379611270863; Thu, 19 Sep 2013 10:21:10 -0700 (PDT) Received: from firesword.mtv.corp.google.com (firesword.mtv.corp.google.com [172.22.73.90]) by mx.google.com with ESMTPSA id oh2sm10543617pbb.3.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 10:21:09 -0700 (PDT) From: Grant Grundler To: Chris Ball , Seungwon Jeon Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler Subject: [PATCH] mmc: core: remove issue_fn indirect function call Date: Thu, 19 Sep 2013 10:20:14 -0700 Message-Id: <1379611214-1089-1-git-send-email-grundler@chromium.org> X-Mailer: git-send-email 1.8.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP struct mmc_queue defines issue_fn as an indirect function call. issue_fn field only gets set to mmc_blk_issue_rq and only gets invoked immediately after calling blk_fetch_request(). Don't bother with indirect function call - it's pointless and just obfuscates the code. Signed-off-by: Grant Grundler Acked-by: Ulf Hansson --- drivers/mmc/card/block.c | 1 - drivers/mmc/card/queue.c | 2 +- drivers/mmc/card/queue.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 1a3163f..b2cdd10 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -2072,7 +2072,6 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, if (ret) goto err_putdisk; - md->queue.issue_fn = mmc_blk_issue_rq; md->queue.data = md; md->disk->major = MMC_BLOCK_MAJOR; diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index fa9632e..6f9adc5 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -67,7 +67,7 @@ static int mmc_queue_thread(void *d) if (req || mq->mqrq_prev->req) { set_current_state(TASK_RUNNING); cmd_flags = req ? req->cmd_flags : 0; - mq->issue_fn(mq, req); + mmc_blk_issue_rq(mq, req); if (mq->flags & MMC_QUEUE_NEW_REQUEST) { mq->flags &= ~MMC_QUEUE_NEW_REQUEST; continue; /* fetch again */ diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h index 5752d50..35380015 100644 --- a/drivers/mmc/card/queue.h +++ b/drivers/mmc/card/queue.h @@ -51,7 +51,6 @@ struct mmc_queue { #define MMC_QUEUE_SUSPENDED (1 << 0) #define MMC_QUEUE_NEW_REQUEST (1 << 1) - int (*issue_fn)(struct mmc_queue *, struct request *); void *data; struct request_queue *queue; struct mmc_queue_req mqrq[2];