From patchwork Sat Oct 26 11:02:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 177811 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp792377ill; Sat, 26 Oct 2019 04:03:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhFPvs9gdxqei5IVq5C6StA6rSWBWqDmwoMSAo1vpTxJYM3K9S4zDnJM5bT94+8tuzd5jH X-Received: by 2002:a17:906:3615:: with SMTP id q21mr6239031ejb.90.1572087797686; Sat, 26 Oct 2019 04:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572087797; cv=none; d=google.com; s=arc-20160816; b=cJ/Szhmel/fezdAEluRbItO1TsLe99etSQYVKHVrKzuMclPLQVKL8UrTJziBKm7V3g 2e+iA7dJkO4lymYTdyeMM33+c4TEF1CWvx6xt7NTd3uWi/M2RnvYiMWmT7KbuTKcbFnU BP1Iq42/3H3U1UlzOi391j07VIUxSzzIRwvSZw3CdlpCPV/htgk63iJXdTnriJNEdkjM R/PcQrEtowcbgrL/fMu9zxucEkqR5plexi/7BE/Tm263B4jX1iqTqEE1UAe4KLCZN7Kk 7EZvpR6hMNrJvf/mYhaLIQjW/ExpXZlkbGpd8zMCr9sD4gXhMDtYEq8SQIT/S/jKJOer yo+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=aiDt5t52KW99BwDzbhRa8ElOQ9bHTmHQCFgO82CwQAI=; b=o6GWUWDDsCTJHTjKYvxOv4udbfs39EvMO9dt0f5J/1a73rZuU69KgYQT12r0pzHhdl k+5KP8pfkeJ/K+i5gvZMgnVVnnYtpG3as4UPzFdjY+oR789c0tLHKMJJvYmlS01pOBaj KxVC7rUUm9PiYd44K5psZX948AqbMsUYMdYSBDVXHsdqhP0JZBuxdldzlgwYM0l3gPUs 5trVbaoDsWZmQrJS/deaEpAo1q+xylhinC9cX04aiIWglWIv90N9GDCxvIbvTqctIVcC YaVDr0mabGfJU0KGd2l5A6+wTXHyNldgfBEv6OSLwHs5dGCxJhyBV6mfM2artQqDKJJP wbbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lhhwxzA5; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w42si3466375edc.440.2019.10.26.04.03.17; Sat, 26 Oct 2019 04:03:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 header.s=google header.b=lhhwxzA5; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1726150AbfJZLDM (ORCPT + 8 others); Sat, 26 Oct 2019 07:03:12 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45417 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfJZLDM (ORCPT ); Sat, 26 Oct 2019 07:03:12 -0400 Received: by mail-pl1-f193.google.com with SMTP id y24so2770211plr.12 for ; Sat, 26 Oct 2019 04:03:11 -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=aiDt5t52KW99BwDzbhRa8ElOQ9bHTmHQCFgO82CwQAI=; b=lhhwxzA5ON8HMXgKQss/I3lq4Lc9V27b5/H3BBvPFcELrZtb9qy4H3N6UI7eSKeKIX In/UEkuOV3hpfrNWLFyNp1dTCo2a1KLy3NAEh5eET6QONjeWZ6mqK6HtmbjjL8hb7tsZ VZ2asUuZ3WiSVH2bww4e4jeLuRQoTcfm8LQjOuqiVEu5HahWqpBD0dCtcESGAR1VnWc3 1cXt1ZkJIub2PohLo4isUuMjqrd/6W9U3+TyOBE1qCdU1RwgDd0hiIMQut+wd5swaukY Wz++RWEtd1yp9IswZYewA75Zk+XMCYBrNIgMkFHqHP+nKFUz105SHBu7/pCYQW9HdFrZ Xcow== 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=aiDt5t52KW99BwDzbhRa8ElOQ9bHTmHQCFgO82CwQAI=; b=qBRfRrLl26DNI+OMdbuRd8sukmG67qspaO7Vs9x/gbhNGp8lnYqNGAHAATAy78AhmS +nZvLK/SgTCznlP6uVGw/AswY/p5ptJ17XDi1uch8railR8nl6VSIsofrdJdkvwa3hCS zfFJCneqDT+3xNt5k/1I4oOF7rXdGIQrmW/N2lz+c+PPzXj0k8s4v4YA6CC4jHNlTKlo 8gi3KFMGN7nx1FiLRSFIDabSjjUdrRSFZu9NDnE8AlJKQjUIAJblAxYPKBK8JnZbKSaO NBO9WF5Y/4EqKsZq23Xtl4Q3P3bHnJ2PhKzsFeFc64+m7t+Ea1OiRZ4KEW10ZBGTwujO Zjow== X-Gm-Message-State: APjAAAXsEYG7pSFEeRd0eQEpf0FvchXI+xHZBIteypY+U3n9s4D1J2KI p8GX3TlxjqWhtaMtxSqK2ORe X-Received: by 2002:a17:902:9682:: with SMTP id n2mr8848737plp.52.1572087791195; Sat, 26 Oct 2019 04:03:11 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6214:69c4:49ad:ba3c:6f9:2d8a]) by smtp.gmail.com with ESMTPSA id x129sm5543379pfx.14.2019.10.26.04.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2019 04:03:10 -0700 (PDT) From: Manivannan Sadhasivam To: sboyd@kernel.org, mturquette@baylibre.com, robh+dt@kernel.org Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, haitao.suo@bitmain.com, darren.tsao@bitmain.com, fisher.cheng@bitmain.com, alec.lin@bitmain.com, Manivannan Sadhasivam Subject: [PATCH v6 1/7] clk: Zero init clk_init_data in helpers Date: Sat, 26 Oct 2019 16:32:47 +0530 Message-Id: <20191026110253.18426-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191026110253.18426-1-manivannan.sadhasivam@linaro.org> References: <20191026110253.18426-1-manivannan.sadhasivam@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The clk_init_data struct needs to be initialized to zero for the new parent_map implementation to work correctly. Otherwise, the member which is available first will get processed. Signed-off-by: Manivannan Sadhasivam --- drivers/clk/clk-composite.c | 2 +- drivers/clk/clk-divider.c | 2 +- drivers/clk/clk-fixed-rate.c | 2 +- drivers/clk/clk-gate.c | 2 +- drivers/clk/clk-mux.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 4f13a681ddfc..28aaf4a3b28a 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -207,7 +207,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name, unsigned long flags) { struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_composite *composite; struct clk_ops *clk_composite_ops; int ret; diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 3f9ff78c4a2a..098b2b01f0af 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -471,7 +471,7 @@ static struct clk_hw *_register_divider(struct device *dev, const char *name, { struct clk_divider *div; struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) { diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index a7e4aef7a376..2c4486c09040 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -58,7 +58,7 @@ struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev, { struct clk_fixed_rate *fixed; struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; /* allocate fixed-rate clock */ diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 1b99fc962745..670053c58c1a 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -141,7 +141,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name, { struct clk_gate *gate; struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 66e91f740508..570b6e5b603b 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -153,7 +153,7 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name, { struct clk_mux *mux; struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; u8 width = 0; int ret;