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: 9412349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A7A36022E for ; Fri, 4 Nov 2016 10:05:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FEB62AD7D for ; Fri, 4 Nov 2016 10:05:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14B7F2AD8C; Fri, 4 Nov 2016 10:05:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51EF22ADA6 for ; Fri, 4 Nov 2016 10:05:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761076AbcKDKFc (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; /*