From patchwork Fri Nov 4 10:05:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 80798 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1065186qge; Fri, 4 Nov 2016 03:05:38 -0700 (PDT) X-Received: by 10.36.78.85 with SMTP id r82mr1287349ita.61.1478253938490; Fri, 04 Nov 2016 03:05:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ls8si12883426pab.313.2016.11.04.03.05.38; Fri, 04 Nov 2016 03:05:38 -0700 (PDT) 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 S1761076AbcKDKFc (ORCPT + 3 others); Fri, 4 Nov 2016 06:05:32 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:34605 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761027AbcKDKFb (ORCPT ); Fri, 4 Nov 2016 06:05:31 -0400 Received: by mail-lf0-f54.google.com with SMTP id b81so59771429lfe.1 for ; Fri, 04 Nov 2016 03:05:31 -0700 (PDT) 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=U9Z5gvhZnMADJfjtKisSA0Zl0vob5AaIDA5e8SrjYC0=; b=eky5UiNA21J8W8w5HDLwS9vle/xahUb+mcYNGKkF6+PSUUNEM7KdAlfWuTACpMVqzK B2Q/B5/+ZlrgBEmIUy8TU/mgJIJpwTjC9sWud4fuPPZMWpYoJCkgMhTrus82SgW5e14P jZodrrQ+vUBxMlWtNJfTRmST9vA5xv4aC/eQo= 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=U9Z5gvhZnMADJfjtKisSA0Zl0vob5AaIDA5e8SrjYC0=; b=HJO/I2qt56KZEj7pDnWGHncA78U7/N5wMLMvMjtDsZmTVqMUzgawOjg8JvRUBeTEO8 P79k913tI9tZSkWCKB0ERyucba+mySy3RYmXNabXPGpq9IWFn1F2XNOc/JIpZReVMxUl xyaAHEh3eusJ6IMgLNSqYfWU65k0bbKpL2k9yM4mBnThVmbB6eBFzbzDuhkvKRTduWrb H+W8yBsp6VQ2pdRijJCSVeztSSpfqg2OlbawH3BmrY/egM4MvOdTpA5LcR5lqDCShTLy RUTpvTO8rsWljwvZhOCHhQmEFXHR96Y1qWoy5nwKrxS4/wWgM9LAPjmKI088ePzg7Z3z K93A== X-Gm-Message-State: ABUngvdtTkWjVkaecpj2c83WTZa0rJ7Y6W16piYaSfi4+F/tG+z2WBm5YFn+LbJ+G8O/pVw2 X-Received: by 10.25.31.16 with SMTP id f16mr6912781lff.48.1478253929801; Fri, 04 Nov 2016 03:05:29 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id p13sm2209627lfp.14.2016.11.04.03.05.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 03:05:29 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Linus Walleij Subject: [PATCH 2/3] mmc: block: convert ecc_err to a bool Date: Fri, 4 Nov 2016 11:05:18 +0100 Message-Id: <1478253919-2469-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478253919-2469-1-git-send-email-linus.walleij@linaro.org> References: <1478253919-2469-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 The ecc_err flag is only assigned 0 or 1 and treated as a bool, so convert it to a bool. Cc: Chunyan Zhang Cc: Baolin Wang Signed-off-by: Linus Walleij --- drivers/mmc/card/block.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 54532580ef3d..016cc22f448e 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1013,7 +1013,7 @@ static int mmc_blk_cmd_error(struct request *req, const char *name, int error, * Otherwise we don't understand what happened, so abort. */ static int mmc_blk_cmd_recovery(struct mmc_card *card, struct request *req, - struct mmc_blk_request *brq, int *ecc_err, bool *gen_err) + struct mmc_blk_request *brq, bool *ecc_err, bool *gen_err) { bool prev_cmd_status_valid = true; u32 status, stop_status = 0; @@ -1052,7 +1052,7 @@ static int mmc_blk_cmd_recovery(struct mmc_card *card, struct request *req, if ((status & R1_CARD_ECC_FAILED) || (brq->stop.resp[0] & R1_CARD_ECC_FAILED) || (brq->cmd.resp[0] & R1_CARD_ECC_FAILED)) - *ecc_err = 1; + *ecc_err = true; /* Flag General errors */ if (!mmc_host_is_spi(card->host) && rq_data_dir(req) != READ) @@ -1084,7 +1084,7 @@ static int mmc_blk_cmd_recovery(struct mmc_card *card, struct request *req, } if (stop_status & R1_CARD_ECC_FAILED) - *ecc_err = 1; + *ecc_err = true; } /* Check for set block count errors */ @@ -1327,7 +1327,7 @@ static int mmc_blk_err_check(struct mmc_card *card, struct mmc_blk_request *brq = &mq_mrq->brq; struct request *req = mq_mrq->req; int need_retune = card->host->need_retune; - int ecc_err = 0; + bool ecc_err = false; bool gen_err = false; /*