From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: linux-mmc@vger.kernel.org
Cc: Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH] mmc: mmci_qcom_dml: fix is never less than zero warning.
Date: Tue, 9 Sep 2014 09:34:49 +0100 [thread overview]
Message-ID: <1410251689-12740-1-git-send-email-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <1408683219-7939-1-git-send-email-srinivas.kandagatla@linaro.org>
This patch fixes a typo which resulted in 'is never less
than zero warning' reported by static checker.
drivers/mmc/host/mmci_qcom_dml.c:131 dml_hw_init()
warn: unsigned 'producer_id' is never less than zero.
drivers/mmc/host/mmci_qcom_dml.c
121 /* Initialize the dml hardware connected to SD Card controller */
122 int dml_hw_init(struct mmci_host *host, struct device_node *np)
123 {
124 u32 config;
125 void __iomem *base;
126 u32 consumer_id, producer_id;
127
128 consumer_id = of_get_dml_pipe_index(np, "tx");
129 producer_id = of_get_dml_pipe_index(np, "rx");
130
131 if (producer_id < 0 || consumer_id < 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Hi Ulf,
This patch is on top of https://git.linaro.org/people/ulf.hansson/mmc.git next branch
to fix up a warning reported by static checker tool.
Are you ok to take this patch as it is or do you think I should resend the
original DML patch with this fix?
thanks,
srini
drivers/mmc/host/mmci_qcom_dml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mmci_qcom_dml.c b/drivers/mmc/host/mmci_qcom_dml.c
index 300ef50..2b7fc37 100644
--- a/drivers/mmc/host/mmci_qcom_dml.c
+++ b/drivers/mmc/host/mmci_qcom_dml.c
@@ -123,7 +123,7 @@ int dml_hw_init(struct mmci_host *host, struct device_node *np)
{
u32 config;
void __iomem *base;
- u32 consumer_id, producer_id;
+ int consumer_id, producer_id;
consumer_id = of_get_dml_pipe_index(np, "tx");
producer_id = of_get_dml_pipe_index(np, "rx");
--
1.9.1
next prev parent reply other threads:[~2014-09-09 8:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 12:02 [PATCH RFC 0/5] mmc: mmci: sdio related fixes Srinivas Kandagatla
2014-08-12 12:03 ` [PATCH RFC 1/5] mmc: mmci: Enable SDIO support for Qualcomm variant data Srinivas Kandagatla
2014-08-12 12:03 ` [PATCH RFC 2/5] mmc: mmci: move block size validation under relevant code Srinivas Kandagatla
2014-08-12 12:04 ` [PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO Srinivas Kandagatla
2014-08-12 14:12 ` Russell King - ARM Linux
2014-08-13 5:14 ` Srinivas Kandagatla
2014-08-13 8:54 ` Linus Walleij
2014-08-12 12:05 ` [PATCH RFC 4/5] mmc: mmci: Add sdio enable mask in variant data Srinivas Kandagatla
2014-08-13 8:55 ` Linus Walleij
2014-08-12 12:05 ` [PATCH RFC 5/5] mmc: mmci: move ST specific sdio setup under a condition Srinivas Kandagatla
2014-08-13 8:58 ` Linus Walleij
2014-08-13 9:45 ` Srinivas Kandagatla
2014-08-19 11:13 ` [PATCH v2 0/4] mmc: mmci: sdio related fixes Srinivas Kandagatla
2014-08-19 11:14 ` [PATCH v2 1/4] mmc: mmci: Support any block sizes for ux500v2 and qcom variant Srinivas Kandagatla
2014-08-19 12:37 ` Ulf Hansson
2014-08-19 11:14 ` [PATCH v2 2/4] mmc: mmci: move block size validation under relevant code Srinivas Kandagatla
2014-08-19 11:55 ` Ulf Hansson
2014-08-19 12:08 ` Srinivas Kandagatla
2014-08-19 11:15 ` [PATCH v2 3/4] mmc: mmci: Add sdio enable mask in variant data Srinivas Kandagatla
2014-08-19 11:15 ` [PATCH v2 4/4] mmc: mmci: rename sdio flag in vendor data to st_sdio Srinivas Kandagatla
2014-08-22 4:53 ` [PATCH v3 0/3] mmc: mmci: sdio related fixes Srinivas Kandagatla
2014-08-22 4:54 ` [PATCH v3 1/3] mmc: mmci: Support any block sizes for ux500v2 and qcom variant Srinivas Kandagatla
2014-09-10 7:58 ` Ulf Hansson
2014-09-10 9:07 ` Srinivas Kandagatla
2014-09-10 10:51 ` Ulf Hansson
2015-07-09 21:40 ` Bjorn Andersson
2019-03-05 22:25 ` Linus Walleij
2019-03-06 17:03 ` Bjorn Andersson
2014-08-22 4:54 ` [PATCH v3 2/3] mmc: mmci: Add sdio enable mask in variant data Srinivas Kandagatla
2014-09-10 7:47 ` Ulf Hansson
2014-08-22 4:55 ` [PATCH v3 3/3] mmc: mmci: rename sdio flag in vendor data to st_sdio Srinivas Kandagatla
2014-09-10 7:48 ` Ulf Hansson
2014-09-09 8:34 ` Srinivas Kandagatla [this message]
2014-09-09 11:53 ` [PATCH] mmc: mmci_qcom_dml: fix is never less than zero warning Ulf Hansson
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=1410251689-12740-1-git-send-email-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=chris@printf.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).