Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp898981pxb; Fri, 22 Jan 2021 01:55:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuyWMbkl64YIMNbhcpobVoqkFNq1hUUSyrpV3aXowhllvOeQFZuGmSlYofnyqFRe7F8N4E X-Received: by 2002:a05:6402:1a2a:: with SMTP id be10mr2515792edb.185.1611309318292; Fri, 22 Jan 2021 01:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611309318; cv=none; d=google.com; s=arc-20160816; b=dIKkH2BNQKI08gqmw9nBl68xIU/TfjmCOArMZ3E4llmFtfnkAc5fQcMHlYtpFZpSy/ NPz/zzhI++0qXMny+VJ3y9Rb4ck5pLK9k0WxWFijAE+BBxAYOC6XmhhqMlpMV5yTJHNO gsCcleDiSP4OMGgB/7Bwdi9pQYQ3Xy7L1HxK+ztfqNBwPwjnDQt98AL/YIrxSH9WafK5 jADIr3ktPgJ2rcfZwaBBt27C33zRYETO10EQXH2ccT2r3yDCa8y9JckyuV9CoJKcVQD1 Jh19jb0sEfbemXF8oQLFo0lbocp49JKI0Od414Ic4DNw3kTIVzd7gikZ1RtKojJ5Rh1b t+aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=X8znVvt11Gf6tz3j7rgBydA6WYzetqabHTGjXGWf8sQ=; b=yyxPh+Yu/T7kVpKa8l8oHMmM63H5IMJ+yrtTKPp59kvwLIGU7Sf7Ja/2osfzzbbsKV zXpidKTeO8xJKJxzhtHi5aoWTBroqwoOHduWoZMeQVC+TCti3dcxWQg8ULOULpRrYyZI L1hPEx3ixgtrF6lBKdjjQp21ZgQlHm9LseQ6KIOU/brYBfwKKXDWnaZ/F5+f8eEYbPc0 C4Tx9hUbPq19Rp7aPetw+xC7WDgsUfW/0CZAlsYTZjN8LRvS9NOhdXxDh2Vmp0+32gg1 DxK9FaBTXAZQGZLxpV0wzd1kT89DO3lIaJ/GJAh8uXBg1qicayfgRRMqosqSwsjdP6EN sa3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fKAf9df3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si2859640ejj.728.2021.01.22.01.54.55; Fri, 22 Jan 2021 01:55:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fKAf9df3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727231AbhAVJxJ (ORCPT + 99 others); Fri, 22 Jan 2021 04:53:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbhAVJqI (ORCPT ); Fri, 22 Jan 2021 04:46:08 -0500 Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683A4C061793 for ; Fri, 22 Jan 2021 01:45:28 -0800 (PST) Received: by mail-ua1-x92d.google.com with SMTP id k22so1647864ual.0 for ; Fri, 22 Jan 2021 01:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X8znVvt11Gf6tz3j7rgBydA6WYzetqabHTGjXGWf8sQ=; b=fKAf9df3B+5Q3xvUV9EPDSzL5dugIci2p8+8LlVDaw3lkiPXV7VFmtQCAMWAuYyxBP cpAIz4u0oafAzp6RAuSraf6NJRnWl9sD1szlojI4MXAzSHhLZlcZ5kVTRfhFUyrg9yGY sx5TuiT9W/2S7qm98exNKvTdJRL9WFxZ0OGpjbzQnj2qMz4oaO4xmppDWpTeoaUNQZom NqEqUneW8wKJCL+9UiGAShuZjn9eJCsi6mvfBf5jy0OqK7f9+nTOGs/gHmP+Y1K2q6ER EPNsH8yOIe1I590YlqNSl2BcarrkG7pYYAChgJIRtD9nQvOS7wwwig+vJQFekotnXFxJ WXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X8znVvt11Gf6tz3j7rgBydA6WYzetqabHTGjXGWf8sQ=; b=DUlknvHY2VPDKwIqrcxj8iOvuvcpo/ek6KGemOdhf5YlzkJiNJnFNP51fu0tVwASSc T/CWT5+6+lYKW/wW2qtz295i0R+y/tghk8UwRKuX2bATPOPMYxzUn6m4JScP34L2Jx80 8ibsP+yWpeF77tcikos5uxmUnntc5bAVNsCrBZDETWiIcX3VE0lfsl5WuIe9IWp1M35K sqA0X3INmnUI1WbnMdRUmLPDw/UcCpcbBhrhdL/ORGbXdfelERL5ntZTT43HZ+7K88ZL kNQ06OdXCZddyYZn9kG2qyX+Gwiud5eiQT3M2Zbo0fHkLfVagMrB/NJIl4fKX4hg84p8 m9KQ== X-Gm-Message-State: AOAM5314anlBdFz7yHhoWZ6Sif8NV6jPuCRD/aoy6OgOgwMkf7Bd74D9 F8Spuyfjt5PABozXt/S7Z4b7QXsWZ90EyajWUrQOSPwe+HrjhQ== X-Received: by 2002:ab0:768:: with SMTP id h95mr2569551uah.104.1611308727664; Fri, 22 Jan 2021 01:45:27 -0800 (PST) MIME-Version: 1.0 References: <1611128377-66216-1-git-send-email-abaci-bugfix@linux.alibaba.com> In-Reply-To: <1611128377-66216-1-git-send-email-abaci-bugfix@linux.alibaba.com> From: Ulf Hansson Date: Fri, 22 Jan 2021 10:44:51 +0100 Message-ID: Subject: Re: [PATCH] mmc: Assign boolean values to a bool variable To: Jiapeng Zhong Cc: Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , "linux-mmc@vger.kernel.org" , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Jan 2021 at 08:39, Jiapeng Zhong wrote: > > Fix the following coccicheck warnings: > > ./drivers/mmc/host/atmel-mci.c:2436:2-34: WARNING: Assignment > of 0/1 to bool variable. > > ./drivers/mmc/host/atmel-mci.c:2425:2-20: WARNING: Assignment > of 0/1 to bool variable. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Zhong Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/atmel-mci.c | 46 ++++++++++++++++++++++---------------------- > 1 file changed, 23 insertions(+), 23 deletions(-) > > diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c > index 444bd3a..6324120 100644 > --- a/drivers/mmc/host/atmel-mci.c > +++ b/drivers/mmc/host/atmel-mci.c > @@ -2401,45 +2401,45 @@ static void atmci_get_cap(struct atmel_mci *host) > dev_info(&host->pdev->dev, > "version: 0x%x\n", version); > > - host->caps.has_dma_conf_reg = 0; > - host->caps.has_pdc = 1; > - host->caps.has_cfg_reg = 0; > - host->caps.has_cstor_reg = 0; > - host->caps.has_highspeed = 0; > - host->caps.has_rwproof = 0; > - host->caps.has_odd_clk_div = 0; > - host->caps.has_bad_data_ordering = 1; > - host->caps.need_reset_after_xfer = 1; > - host->caps.need_blksz_mul_4 = 1; > - host->caps.need_notbusy_for_read_ops = 0; > + host->caps.has_dma_conf_reg = false; > + host->caps.has_pdc = true; > + host->caps.has_cfg_reg = false; > + host->caps.has_cstor_reg = false; > + host->caps.has_highspeed = false; > + host->caps.has_rwproof = false; > + host->caps.has_odd_clk_div = false; > + host->caps.has_bad_data_ordering = true; > + host->caps.need_reset_after_xfer = true; > + host->caps.need_blksz_mul_4 = true; > + host->caps.need_notbusy_for_read_ops = false; > > /* keep only major version number */ > switch (version & 0xf00) { > case 0x600: > case 0x500: > - host->caps.has_odd_clk_div = 1; > + host->caps.has_odd_clk_div = true; > fallthrough; > case 0x400: > case 0x300: > - host->caps.has_dma_conf_reg = 1; > - host->caps.has_pdc = 0; > - host->caps.has_cfg_reg = 1; > - host->caps.has_cstor_reg = 1; > - host->caps.has_highspeed = 1; > + host->caps.has_dma_conf_reg = true; > + host->caps.has_pdc = false; > + host->caps.has_cfg_reg = true; > + host->caps.has_cstor_reg = true; > + host->caps.has_highspeed = true; > fallthrough; > case 0x200: > - host->caps.has_rwproof = 1; > - host->caps.need_blksz_mul_4 = 0; > - host->caps.need_notbusy_for_read_ops = 1; > + host->caps.has_rwproof = true; > + host->caps.need_blksz_mul_4 = false; > + host->caps.need_notbusy_for_read_ops = true; > fallthrough; > case 0x100: > - host->caps.has_bad_data_ordering = 0; > - host->caps.need_reset_after_xfer = 0; > + host->caps.has_bad_data_ordering = false; > + host->caps.need_reset_after_xfer = false; > fallthrough; > case 0x0: > break; > default: > - host->caps.has_pdc = 0; > + host->caps.has_pdc = false; > dev_warn(&host->pdev->dev, > "Unmanaged mci version, set minimum capabilities\n"); > break; > -- > 1.8.3.1 >