From patchwork Tue Apr 4 06:17:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 96674 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp48117qgd; Mon, 3 Apr 2017 23:17:44 -0700 (PDT) X-Received: by 10.84.229.10 with SMTP id b10mr26704583plk.148.1491286664244; Mon, 03 Apr 2017 23:17:44 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si746909pgf.57.2017.04.03.23.17.44; Mon, 03 Apr 2017 23:17:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751005AbdDDGRn (ORCPT + 6 others); Tue, 4 Apr 2017 02:17:43 -0400 Received: from mail-pg0-f43.google.com ([74.125.83.43]:34573 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbdDDGRn (ORCPT ); Tue, 4 Apr 2017 02:17:43 -0400 Received: by mail-pg0-f43.google.com with SMTP id 21so142751357pgg.1 for ; Mon, 03 Apr 2017 23:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=748spIC5zfHXulxOiBih0Tgm/jI0ve+M+oXVdPAI3to=; b=ch4Ndl0LqV4NAwREPI3xWnAGKQgPZvbBLK+iBFWvlKe3dAvS7u7UqeOKVYPuhPddVA sbwJljAyysAZfATGw/MLuSqeqjxT8V+jx9NDHWFg4hYVl+re5KAHkrLozMSG+mWoM7ud UsAXsqTWFdWtFPo47Poy4kb7yls1feuVtVUAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=748spIC5zfHXulxOiBih0Tgm/jI0ve+M+oXVdPAI3to=; b=OrUBhZIz+sUf5HRhuJu8Z9pxd/vzw53HF3qC6UCQyWvgc2S2cnuXSIjx2TA6Lf/rVJ QlaYbaeOHF7UAeFH+jlHtqejWQ2lp49MplXNx2CxaHYxPd/dgIvYP+pp+D/XBFuppcQ7 N9qDII44QEMSLA5SWjRFaykLCYy4WEcwB4pfEg0aSnGC2xK5J9VVGB0R4fTBZzo2b8LL EVPmjFkk8MeC0ljnAD6r7nNhJWsMfc0Q4CNjnA4w6GqRWOZAx5BY6tcQ2wa/h7hecF2i lAuO7u7UM3haJoPDhPM+8gSZAYgi16GOBV0DcN2od3Giqt7hXF9Igo+crEkToMcFwGst o0pA== X-Gm-Message-State: AFeK/H1dlIiEa236IeehlgvbPp5Jwbk4niqy9MlQ8YpEGmjfbwzvu8G0/A6GLlv3rWpCA5kF X-Received: by 10.99.52.202 with SMTP id b193mr21427789pga.131.1491286662235; Mon, 03 Apr 2017 23:17:42 -0700 (PDT) Received: from localhost.localdomain ([106.51.240.246]) by smtp.gmail.com with ESMTPSA id l126sm29224804pfl.56.2017.04.03.23.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 23:17:41 -0700 (PDT) From: Amit Pundir To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Boris Brezillon , Stephen Boyd Subject: [PATCH 12/33] clk: bcm: Fix 'maybe-uninitialized' warning in bcm2835_clock_choose_div_and_prate() Date: Tue, 4 Apr 2017 11:47:26 +0530 Message-Id: <1491286653-31193-3-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491286653-31193-1-git-send-email-amit.pundir@linaro.org> References: <1491286653-31193-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Boris Brezillon best_rate is reported as potentially uninitialized by gcc. Signed-off-by: Boris Brezillon Fixes: 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks") Reported-by: Stephen Rothwell Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd (cherry picked from commit 2aab7a2055a1705c9e30920d95a596226999eb21) Signed-off-by: Amit Pundir --- drivers/clk/bcm/clk-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index eaf82f4..0d14409 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -1029,7 +1029,7 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw, struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); struct bcm2835_cprman *cprman = clock->cprman; const struct bcm2835_clock_data *data = clock->data; - unsigned long best_rate; + unsigned long best_rate = 0; u32 curdiv, mindiv, maxdiv; struct clk_hw *parent;