From patchwork Tue Sep 9 08:34:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 37048 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C3A9520566 for ; Tue, 9 Sep 2014 08:35:05 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf48337384qcx.5 for ; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=3o/Lp/rwU00RVlthLxhPrXiRjCvwiEEbJ8wWLODjtok=; b=IgF1dg0iu7dhFQV+gIQuQsFb17elQGzwL14n5LOxv/iq9CMLzGL2e02otS9okK+GXO PZvEknRx0DveWLwn1LdSNIZ2t7cWENsyKB26agC71NozRHhmh4fQAYJzxPU0EEDf30op LsMCU8YEqGiSU25MZNsIAiMjqTQi/cigQIrLgnK6LipXrJNvVoRWpbmz44/hhbPnqGUW Q2d7pueBuF9xJEGR41zCjHshQnOWQtRaJaz5+xnc9zM/YMqduvORw4D46RxFrm338tHN aYhCV801/9N2GlL0DIHbWOkMvwCGS55imiM4VeFDdja0PPM3c2yhfD1+f/mMKHkfLMfk saQA== X-Gm-Message-State: ALoCoQkZutBixySiQcA7cFwx2IXMPmAzO0R2Ok4mwGZvLPoSiNiqDLlUdJ6Ehok6W8iqLFI7ArBb X-Received: by 10.52.190.163 with SMTP id gr3mr20992685vdc.3.1410251705645; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.73 with SMTP id f67ls1456687qge.61.gmail; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) X-Received: by 10.220.105.201 with SMTP id u9mr29566645vco.11.1410251705541; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id hv8si5603422vdb.6.2014.09.09.01.35.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 01:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so2970984vcb.31 for ; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) X-Received: by 10.220.46.5 with SMTP id h5mr92182vcf.55.1410251705452; Tue, 09 Sep 2014 01:35:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp250119vcb; Tue, 9 Sep 2014 01:35:04 -0700 (PDT) X-Received: by 10.69.31.10 with SMTP id ki10mr27922056pbd.11.1410251704513; Tue, 09 Sep 2014 01:35:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pm2si22058475pdb.74.2014.09.09.01.35.03 for ; Tue, 09 Sep 2014 01:35:04 -0700 (PDT) Received-SPF: none (google.com: linux-arm-msm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756059AbaIIIfC (ORCPT + 5 others); Tue, 9 Sep 2014 04:35:02 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:58150 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752567AbaIIIe7 (ORCPT ); Tue, 9 Sep 2014 04:34:59 -0400 Received: by mail-wg0-f50.google.com with SMTP id x13so4290577wgg.21 for ; Tue, 09 Sep 2014 01:34:58 -0700 (PDT) X-Received: by 10.194.205.196 with SMTP id li4mr39932790wjc.46.1410251697833; Tue, 09 Sep 2014 01:34:57 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-148-158-3.as13285.net. [78.148.158.3]) by mx.google.com with ESMTPSA id hm7sm14573339wib.12.2014.09.09.01.34.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Sep 2014 01:34:56 -0700 (PDT) From: Srinivas Kandagatla To: linux-mmc@vger.kernel.org Cc: Chris Ball , Ulf Hansson , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH] mmc: mmci_qcom_dml: fix is never less than zero warning. Date: Tue, 9 Sep 2014 09:34:49 +0100 Message-Id: <1410251689-12740-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408683219-7939-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1408683219-7939-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Signed-off-by: Srinivas Kandagatla --- 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");