From patchwork Fri Jul 10 07:45:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 51010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22F44228E5 for ; Fri, 10 Jul 2015 07:46:12 +0000 (UTC) Received: by wizo10 with SMTP id o10sf2577774wiz.0 for ; Fri, 10 Jul 2015 00:46:11 -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=o/i/nrG4v/JAPtKBFhB6A62kIOYBRnI6PPDkuiAIM3I=; b=WGy2+yLZDA4Vv5lONwoeDRZNudbFWPbd+dnbRW8JEH3iZsO/G29pv0mFan61n4VIDV 5Vt6RcfscJMedbxnROt6ha6Ta1DIGhtB4z4rE3g255uMQP0CBEGeoB1syJ966C+haijK HHxt3e+1e5LKIV9YnUwhTks2ajawRXlspLc2MOqv228r5gKwvd63QfsM7IcovZ3MydCW DOqOW6URA3b4TWwCkQXQsoHxPIw4ahPYfGx2NMGsCbb7goO44qSZFoThYsz7ti2E7LE1 j9PU+DiHH8bMQVjzZNd5O7RgVO7f8fAeVqC2b7L25O67lmzBPB977/Dp/DGSa6N0CZ+8 QPqA== X-Gm-Message-State: ALoCoQmNWEI+l2UGH7X7r/S4Gjz8gO5OWtHhjxnrxuJx0P5sJg3ZrZ/cgSZP3tdEon/XLZlrvnCS X-Received: by 10.180.186.36 with SMTP id fh4mr1114631wic.7.1436514371466; Fri, 10 Jul 2015 00:46:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.195 with SMTP id o3ls1223802laf.1.gmail; Fri, 10 Jul 2015 00:46:11 -0700 (PDT) X-Received: by 10.152.36.41 with SMTP id n9mr18720065laj.79.1436514371270; Fri, 10 Jul 2015 00:46:11 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id e7si6980682lbc.62.2015.07.10.00.46.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 00:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbnk3 with SMTP id k3so87938172lbn.1 for ; Fri, 10 Jul 2015 00:46:11 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr18594515lbb.36.1436514371127; Fri, 10 Jul 2015 00:46:11 -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.112.108.230 with SMTP id hn6csp1181971lbb; Fri, 10 Jul 2015 00:46:09 -0700 (PDT) X-Received: by 10.70.102.137 with SMTP id fo9mr39049969pdb.87.1436514368884; Fri, 10 Jul 2015 00:46:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si13313476pdm.106.2015.07.10.00.46.07; Fri, 10 Jul 2015 00:46:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753372AbbGJHqG (ORCPT + 29 others); Fri, 10 Jul 2015 03:46:06 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:33760 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752304AbbGJHpn (ORCPT ); Fri, 10 Jul 2015 03:45:43 -0400 Received: by wgck11 with SMTP id k11so242429534wgc.0 for ; Fri, 10 Jul 2015 00:45:41 -0700 (PDT) X-Received: by 10.194.83.70 with SMTP id o6mr37546525wjy.44.1436514341875; Fri, 10 Jul 2015 00:45:41 -0700 (PDT) Received: from localhost.localdomain (host86-178-207-130.range86-178.btcentralplus.com. [86.178.207.130]) by smtp.gmail.com with ESMTPSA id w8sm5078102wja.15.2015.07.10.00.45.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Jul 2015 00:45:41 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, broonie@kernel.org, lgirdwood@gmail.com, Lee Jones Subject: [PATCH 2/3] regulator: pwm-regulator: Fix 'used uninitialized' warning Date: Fri, 10 Jul 2015 08:45:35 +0100 Message-Id: <1436514336-2075-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436514336-2075-1-git-send-email-lee.jones@linaro.org> References: <1436514336-2075-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@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.217.174 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: , drivers/regulator/pwm-regulator.c: In function 'pwm_regulator_init_table': drivers/regulator/pwm-regulator.c:172:14: warning: 'length' is used uninitialized in this function [-Wuninitialized] if ((length < sizeof(*duty_cycle_table)) || ^ Reported-by: kbuild test robot Signed-off-by: Lee Jones --- drivers/regulator/pwm-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index a4c2ce9..331b851 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -163,7 +163,7 @@ static int pwm_regulator_init_table(struct platform_device *pdev, { struct device_node *np = pdev->dev.of_node; struct pwm_voltages *duty_cycle_table; - int length; + int length = 0; int ret; of_find_property(np, "voltage-table", &length);