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: 4866751 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D8BE9F3EC for ; Tue, 9 Sep 2014 08:35:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A5AE20149 for ; Tue, 9 Sep 2014 08:35:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBF7E20145 for ; Tue, 9 Sep 2014 08:35:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756059AbaIIIfC (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Lz19oYdYaruGpJ/ZkMQcrNWrrxtoHiyWbXIs7H6wAs4=; b=GRd773lghrZSkfba2s7p9eB3zhb+cdwTFAws/4AwT+7Kvwa+dmvrNUfel6WHgCCl5K S2BTgnik3Ol5vuWj/3jOzPyTFAPNzTxUZokzUUGW1IDpW0CDuEDKppdOKOmur7NSY4F8 ZxxRklMm+KjyPj+5NrVrt48KMC3bK4gLdkquFgZ0godl3YVu94rKWP2PgI27S83CKI1M 0cL5LIX0XD18UZhvYA1ATrUT8Ye6ZAxNu5flmCl1ZO8ZvK/NWIQBqi5hD4YiW/AfrePc Cf0+u3eTyjMMEp7ZVWJPbIBHzpnJyGTLewAXH8Y9vdIQd2AoMJnoKsZea3Osz3OUttdE H+kQ== X-Gm-Message-State: ALoCoQlO6ViH3uW5sZI8xsL/IKK/mnNhkjqTTiE/H1+bPWd2RXeSxQSOPNbrB0WRTB78IEVk8BJp 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: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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");