From patchwork Fri Aug 23 19:55:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 172130 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1120480ily; Fri, 23 Aug 2019 12:55:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhZadloaC8LIperzJE9x3KI90VlctCW3DdYT3gHRX8VzuL7S4u1384ovVfzabUbg1Qa04h X-Received: by 2002:a63:4823:: with SMTP id v35mr5473350pga.138.1566590138758; Fri, 23 Aug 2019 12:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566590138; cv=none; d=google.com; s=arc-20160816; b=0/I4iM3SNavzcyG6lr03gkJ7ARZhw2QfEZB9pmnEcHeH0mdHLC/+MLnDSksXY9Hynz b7UaJIKuZUR313R0bBQ4hpIA7hK1o13PtNzyqUOREGlIbaAj7qY2I6kibOPErlUPjFOD /lwN8sjPYFfGYypPMc0x28vsnXoEuev0t0VxLCzOpaObG4uvOx4Aav0CdxoIZl5N+uML +Z5rErWQjkG4laYdGioDiE8nimnJcIJfgyrb0r9A5HGbHh6RTytkDlK60rngjULKBqcg k5/WZ9cMsiMorjdm/zV3xPdbPyUIOC0xSgPS3nbjwe9s5ZO6wx/nagOONdYcrgDpFjBU zj5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=s0XicrLXuGI/HXmhbkjUlUHssBuuijSTQe3NjyOcpYc=; b=bvejrlnD5Cw8p6U0mZ66v87EOFwi0HFks19dSJGbd/BSGWq6qD87IQAD2j1mGlmCo0 xbfq2BirSAvjeslapT7KnpenDz0kIHixwTpda3e2+JMI+k2t94B2KH0fVYp5EYlC/Cwk YmLfF/6T80hJiosAaYIWAAodJQQlpGJtKN/SOA64h8x3e/aMztt3CaCWcjg1r09hf3dF rTmaH82WNJ3i3mm8c+z2ojHrOG4Syqk+UdAEg4B3aRJcOQ3psyT8OhD1ILamgO9ji421 srL0kH/7eqwc/SMqXiEZIOePQbHFd8DPaICVnb2BQLTdF/Hfol+bXbyQ77Z7VOM8II5/ vyXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Yj9GHaIN; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e37si2775503pge.343.2019.08.23.12.55.38; Fri, 23 Aug 2019 12:55:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Yj9GHaIN; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391184AbfHWTzh (ORCPT + 1 other); Fri, 23 Aug 2019 15:55:37 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:51446 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392200AbfHWTzf (ORCPT ); Fri, 23 Aug 2019 15:55:35 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x7NJtRxr044090; Fri, 23 Aug 2019 14:55:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1566590127; bh=s0XicrLXuGI/HXmhbkjUlUHssBuuijSTQe3NjyOcpYc=; h=From:To:CC:Subject:Date; b=Yj9GHaINlCrLeqpl554w/KOYgdyGojesoH0OC4jJaXLz1xIV/29ZxiqNurw1BKwk+ Bi15b+mYcRCSC18HK3TvzCX7kClgG+vCVvYPenvVu3hYbTQgnCbf3N/pdxzwvF3RdF +jW4fAByG5Pfe9cLExhlaOpInKNEQwp4hXmLz/7A= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x7NJtRCG069056 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Aug 2019 14:55:27 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 23 Aug 2019 14:55:27 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 23 Aug 2019 14:55:27 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x7NJtRZL004700; Fri, 23 Aug 2019 14:55:27 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH] leds: ti-lmu-common: Fix coccinelle issue in TI LMU Date: Fri, 23 Aug 2019 14:55:23 -0500 Message-ID: <20190823195523.20950-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Fix the coccinelle issues found in the TI LMU common code drivers/leds/leds-ti-lmu-common.c:97:20-29: WARNING: Unsigned expression compared with zero: ramp_down < 0 drivers/leds/leds-ti-lmu-common.c:97:5-12: WARNING: Unsigned expression compared with zero: ramp_up < 0 Fixes: f717460ba4d7 ("leds: TI LMU: Add common code for TI LMU devices") Signed-off-by: Dan Murphy --- drivers/leds/leds-ti-lmu-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-ti-lmu-common.c b/drivers/leds/leds-ti-lmu-common.c index adc7293004f1..c9ab40d5a6ba 100644 --- a/drivers/leds/leds-ti-lmu-common.c +++ b/drivers/leds/leds-ti-lmu-common.c @@ -84,7 +84,7 @@ static int ti_lmu_common_convert_ramp_to_index(unsigned int usec) int ti_lmu_common_set_ramp(struct ti_lmu_bank *lmu_bank) { struct regmap *regmap = lmu_bank->regmap; - u8 ramp, ramp_up, ramp_down; + int ramp, ramp_up, ramp_down; if (lmu_bank->ramp_up_usec == 0 && lmu_bank->ramp_down_usec == 0) { ramp_up = 0;