From patchwork Wed Aug 21 14:30:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Daudt X-Patchwork-Id: 2847769 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D25E2BF546 for ; Wed, 21 Aug 2013 14:30:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6E2C20525 for ; Wed, 21 Aug 2013 14:30:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 682C42052A for ; Wed, 21 Aug 2013 14:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123Ab3HUOa2 (ORCPT ); Wed, 21 Aug 2013 10:30:28 -0400 Received: from mms1.broadcom.com ([216.31.210.17]:3528 "EHLO mms1.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098Ab3HUOa1 convert rfc822-to-8bit (ORCPT ); Wed, 21 Aug 2013 10:30:27 -0400 Received: from [10.9.208.53] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Wed, 21 Aug 2013 07:26:22 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from SJEXCHCAS05.corp.ad.broadcom.com (10.16.203.12) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.1.438.0; Wed, 21 Aug 2013 07:30:15 -0700 Received: from SJEXCHMB09.corp.ad.broadcom.com ( [fe80::3da7:665e:cc78:181f]) by SJEXCHCAS05.corp.ad.broadcom.com ( [::1]) with mapi id 14.01.0438.000; Wed, 21 Aug 2013 07:30:11 -0700 From: "Christian Daudt" To: "Dan Carpenter" , "Chris Ball" cc: "Grant Likely" , "Rob Herring" , "Arnd Bergmann" , "linux-mmc@vger.kernel.org" , "devicetree@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: RE: [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo Thread-Topic: [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo Thread-Index: AQHOnkfjbY3oS55REUGcWDkWa1NG2JmfuPHw Date: Wed, 21 Aug 2013 14:30:11 +0000 Message-ID: <400A4C8D93A8FA4CAECDE394033FA86A2AD236D7@SJEXCHMB09.corp.ad.broadcom.com> References: <20130821082423.GA5240@elgon.mountain> In-Reply-To: <20130821082423.GA5240@elgon.mountain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.16.203.100] MIME-Version: 1.0 X-WSS-ID: 7E0A118431W86468997-01-01 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Dan, Good catch. This fix is already in the "ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona" patch that is part of the git pull request sent to armsoc yesterday: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/193422.html Thanks, Csd -----Original Message----- From: Dan Carpenter [mailto:dan.carpenter@oracle.com] Sent: Wednesday, August 21, 2013 1:24 AM To: Chris Ball Cc: Grant Likely; Rob Herring; Christian Daudt; Arnd Bergmann; linux-mmc@vger.kernel.org; devicetree@vger.kernel.org; kernel-janitors@vger.kernel.org Subject: [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo The intent was to test if a flag was set. In the current code the conditions are always true. Signed-off-by: Dan Carpenter --- Static checker stuff. Untested. -- 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/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 87175f9..9ffac0b 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -263,7 +263,7 @@ static int __init sdhci_bcm_kona_probe(struct platform_device *pdev) (mmc_gpio_get_cd(host->mmc) != -ENOSYS) ? 'Y' : 'N', (mmc_gpio_get_ro(host->mmc) != -ENOSYS) ? 'Y' : 'N'); - if (host->mmc->caps | MMC_CAP_NONREMOVABLE) + if (host->mmc->caps & MMC_CAP_NONREMOVABLE) host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; dev_dbg(dev, "is_8bit=%c\n", @@ -282,7 +282,7 @@ static int __init sdhci_bcm_kona_probe(struct platform_device *pdev) } /* if device is eMMC, emulate card insert right here */ - if (host->mmc->caps | MMC_CAP_NONREMOVABLE) { + if (host->mmc->caps & MMC_CAP_NONREMOVABLE) { ret = sdhci_bcm_kona_sd_card_emulate(host, 1); if (ret) { dev_err(dev,