From patchwork Fri Nov 18 12:36:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 82877 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp51064qge; Fri, 18 Nov 2016 04:36:29 -0800 (PST) X-Received: by 10.37.165.41 with SMTP id h38mr4007264ybi.93.1479472589374; Fri, 18 Nov 2016 04:36:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j197si1632030ywb.470.2016.11.18.04.36.29; Fri, 18 Nov 2016 04:36:29 -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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbcKRMg2 (ORCPT + 4 others); Fri, 18 Nov 2016 07:36:28 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37026 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbcKRMg2 (ORCPT ); Fri, 18 Nov 2016 07:36:28 -0500 Received: by mail-wm0-f50.google.com with SMTP id t79so34893018wmt.0 for ; Fri, 18 Nov 2016 04:36:27 -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:in-reply-to:references; bh=OsKLMHKbpUnMP3LDlPLM3ODetGgwcRcHqpnYgxx0VWE=; b=Ct/2PgUUnJNLXxzDveWpPkknSgoyb+p86Oum1+OZbg23/DHpjbAXNIFDQZFtVVO5Ks dVoEhhsIQqy36hnTMmraPaPIwLURzinTF7yTg67gKwXznNrdyg6F80zKIlJG28T2gvcz ilIGgAQHsor8BEpbsRINaquMyZ/S+7LUzghc4= 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:in-reply-to :references; bh=OsKLMHKbpUnMP3LDlPLM3ODetGgwcRcHqpnYgxx0VWE=; b=kuHn5rQUX7QaVpSH0Bbz/HElkCuOCXsz+cp5BVeB3tv1ZPv81aZ594fAQZpymRAuym F6n50aadnybCIl1NwPLGdEu+Lk1SVbh7XkWls+YATSM5Ylez1eSOsmqRdf7PSB/5OarR 6Y4fk5BnAvcBcu9UQ7F1jtjQaSOkiX94Bz/XtzrpxIxx1JeJo1wo9hXSAyKIsWVSNqnl df7NlcT3dMCRCQbcYvmau7uKd1nhP18pWj28xStAffEyWZ/qA6LGLtYVspkTakR+M3kk j2V/NHffl2omP1VYinE5t1K3UeeTmzEJc+bfX6z1iFaErYcN0y/4BGTpMGkJNsFGIXEu 1fDw== X-Gm-Message-State: ABUngvf5apizJ2IJu7GjOm99d9jy7BaNVKdV6UqkEoKCvXC+NFSzV+bQYFONBa2TwpI6A5jx X-Received: by 10.25.5.7 with SMTP id 7mr1677418lff.125.1479472586531; Fri, 18 Nov 2016 04:36:26 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m81sm2168038lfd.45.2016.11.18.04.36.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Nov 2016 04:36:26 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Linus Walleij Subject: [PATCH 1/3] mmc: block: use mmc_req_is_special() Date: Fri, 18 Nov 2016 13:36:14 +0100 Message-Id: <1479472576-2687-2-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479472576-2687-1-git-send-email-linus.walleij@linaro.org> References: <1479472576-2687-1-git-send-email-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Instead of open coding the check for the same thing that the helper checks: use the helper. Signed-off-by: Linus Walleij --- drivers/mmc/card/block.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.7.4 -- 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 diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 4c397b9684e5..56209d32ca5f 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1735,9 +1735,7 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req) !IS_ALIGNED(blk_rq_sectors(next), 8)) break; - if (req_op(next) == REQ_OP_DISCARD || - req_op(next) == REQ_OP_SECURE_ERASE || - req_op(next) == REQ_OP_FLUSH) + if (mmc_req_is_special(next)) break; if (rq_data_dir(cur) != rq_data_dir(next))