From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Chris Ball <cjb@laptop.org>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Christian Daudt <csd@broadcom.com>, Arnd Bergmann <arnd@arndb.de>,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo
Date: Wed, 21 Aug 2013 08:57:57 +0000 [thread overview]
Message-ID: <52148115.3050703@bfs.de> (raw)
In-Reply-To: <20130821082423.GA5240@elgon.mountain>
Am 21.08.2013 10:24, schrieb Dan Carpenter:
> The intent was to test if a flag was set. In the current code the
> conditions are always true.
I guess that it worked before ...
That leaves the Question: are the tests needed at all ?
re,
wh
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff. Untested.
>
> 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,
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Chris Ball <cjb@laptop.org>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Christian Daudt <csd@broadcom.com>, Arnd Bergmann <arnd@arndb.de>,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo
Date: Wed, 21 Aug 2013 10:57:57 +0200 [thread overview]
Message-ID: <52148115.3050703@bfs.de> (raw)
In-Reply-To: <20130821082423.GA5240@elgon.mountain>
Am 21.08.2013 10:24, schrieb Dan Carpenter:
> The intent was to test if a flag was set. In the current code the
> conditions are always true.
I guess that it worked before ...
That leaves the Question: are the tests needed at all ?
re,
wh
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff. Untested.
>
> 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,
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-08-21 8:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 8:24 [patch] mmc: sdhci-bcm-kona: '|' vs '&' typo Dan Carpenter
2013-08-21 8:24 ` Dan Carpenter
2013-08-21 8:57 ` walter harms [this message]
2013-08-21 8:57 ` walter harms
2013-08-21 9:14 ` Dan Carpenter
2013-08-21 9:14 ` Dan Carpenter
2013-08-21 14:30 ` Christian Daudt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52148115.3050703@bfs.de \
--to=wharms@bfs.de \
--cc=arnd@arndb.de \
--cc=cjb@laptop.org \
--cc=csd@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.