From patchwork Tue Jan 24 10:17:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92319 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624241obz; Tue, 24 Jan 2017 02:18:09 -0800 (PST) X-Received: by 10.98.198.90 with SMTP id m87mr36873972pfg.153.1485253089486; Tue, 24 Jan 2017 02:18:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.09; Tue, 24 Jan 2017 02:18:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750929AbdAXKSI (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:08 -0500 Received: from mail-lf0-f51.google.com ([209.85.215.51]:32803 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbdAXKSH (ORCPT ); Tue, 24 Jan 2017 05:18:07 -0500 Received: by mail-lf0-f51.google.com with SMTP id x1so21437038lff.0 for ; Tue, 24 Jan 2017 02:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=exRdca8BcOrFwGfHi6mBuGhxZjzwB1JdwcydyIH9Bcc=; b=NnZ21juvAnNkwwVjBZKn+Lz8l/qIa9oKr+LuH6iZm9ko2kSFCIxSkU1cJugSYItLfp REh5KCkgE4N9MkQKnG0VQUgXd7ANhTaQFfuYyhLfrhnOELcgPK84F0rDQmZjOd1kxQ+r mQVl5qZ4sk4pWq1LWXIIbS700ZrLYxY5UZgHc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=exRdca8BcOrFwGfHi6mBuGhxZjzwB1JdwcydyIH9Bcc=; b=kCtpMdFTS5ma4nRjVHTCDYy6iso5YvedZxHTZIVPxSNFJnHdBP1xLOEg31Ra9V3mk6 YllRxoTBZPm+puXDce+6dE6Ra3WZEZCNBveOSwLV50FI0ADsYx2+6So23etTG6ewJRVQ aNudMYwn/4UsbxZbLc/lGyyOD3t+P2F54QtBGPmghmpMPuPY7movjtIpkbCjBoOAdd9U f2u/HWideHWrNgZT64wQburXB7bjaCjao3UxP3fZEEzfmNuOnY2vetvX8/RcaBKGDSGP gqAdtEWK788uSfsNa3EGL4vDdqrPTR8YZlw3ofK/vM+YeXJXesO9heyqm9tLMyw+Ok2L KZ2A== X-Gm-Message-State: AIkVDXLq33Hwx+05nYotta9+GfevJ4kTB35T/hNHVV15JQwJjk7C0wzCZHUr41xsSwLnqSRz X-Received: by 10.25.67.11 with SMTP id q11mr11045542lfa.139.1485253085172; Tue, 24 Jan 2017 02:18:05 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:03 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 0/6] mmc: block: command issue cleanups Date: Tue, 24 Jan 2017 11:17:51 +0100 Message-Id: <20170124101757.19676-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The function mmc_blk_issue_rw_rq() is hopelessly convoluted and need to be refactored to it can be understood by humans. In the process I found some weird magic return values passed around for no good reason. Things are more readable after this. This work is done towards the goal of breaking the function in two parts: one just submitting the requests and one checking the result and possibly resubmitting the command on error, so we can make the usual path (non-errorpath) smooth and quick, and be called directly when the driver completes a request. That in turn is a prerequisite for proper blk-mq integration with the MMC/SD stack. All that comes later. Linus Walleij (6): mmc: block: break out mmc_blk_rw_cmd_abort() mmc: block: break out mmc_blk_rw_start_new() mmc: block: do not assign mq_rq when aborting command mmc: block: inline command abortions mmc: block: introduce new_areq and old_areq mmc: block: stop passing around pointless return values drivers/mmc/core/block.c | 108 ++++++++++++++++++++++++++--------------------- drivers/mmc/core/block.h | 2 +- 2 files changed, 60 insertions(+), 50 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html