From patchwork Fri Nov 15 16:28:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 179503 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp12679567ilf; Fri, 15 Nov 2019 08:29:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzBu1ef2qWjCKSA+EQaWBwGXC0Ep4LbU9sAqgDO/xdEFPeJzpn30avUoh6m9ZSHYFmPi4ue X-Received: by 2002:a17:906:494d:: with SMTP id f13mr2056693ejt.250.1573835363402; Fri, 15 Nov 2019 08:29:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573835363; cv=none; d=google.com; s=arc-20160816; b=BAF/XbDhyBzMc80caWDXLPl5/v2XK/TOEbnh/NUGhjx7MhYqMg6LjcL9tvCEX/xlfv wamTh7Xs6GZZxrMb2WOEljf2vbWQHAoTnExZAELQLxS4lHec/rwNp3ymOCSuMXl8qVoC tkdFbqfA/xeoxLnivcex1FDBtt2i6LM8EvF7+pJSTuGjk24OT1UAFYAUns4lkYaRWUj2 78laKQ57BA+ukj8uP1CpIC+sEYdCAHseTm1CQSNkj8p4ue0MnZIiGOvj+oL9Uwp+fmcM qqQW/OY3fbZGfZauPKc24Hl7Wc83eT4HvidBaOft6RY4+TX5Wci6HFPBi4iKlbBiDmvj xqxg== 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=fYeM8B36eY9hP2FmNqq18LzZRix9PUPe3zOkuLKI8OVBcMfImmEGZSx52MILCfiqey LtYBrGG31Yp+fJqhxGww4zIu5zyXo1DmftEvEgKGtOPIw4TKaNsFN4RXfN5Hv9ZxUgzp 8dKPAwuJSPkZfNRHv1tAAaNDvTOoK2NKRWGGVZ/CUiGFwoQzl5XbzE9tvweoqCMT2Eij FLhMoIec+mHmu3cOvNVwpiZMMBxOGuqvsyYPiN6uithGhSRQnUO2zDDnFp4gb/ROEmP+ FHLJ4a/T5tlARHm6P8eyOjiuMRFjnsg18uTV9nFWaj/RnIytqNCJRGrE3s52FImT7OXc mhww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Oy/O4BqG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 v13si8885148edb.164.2019.11.15.08.29.23; Fri, 15 Nov 2019 08:29:23 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Oy/O4BqG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727629AbfKOQ3U (ORCPT + 26 others); Fri, 15 Nov 2019 11:29:20 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43140 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbfKOQ3T (ORCPT ); Fri, 15 Nov 2019 11:29:19 -0500 Received: by mail-pg1-f194.google.com with SMTP id l24so6220509pgh.10 for ; Fri, 15 Nov 2019 08:29:18 -0800 (PST) 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=Oy/O4BqGl/cYIaUeSeBVIA1VgGxIh5tfnMB5Dwc+UgTdmMx7bk64U5C+VRdzu/xN95 3EQUhetkGTfikrqkG9rHFqi96AH6DcTeIhL1orxGmc+OXRnALWOr8RncE5relrzlVDOm o9qjzgh/PzuJX4wVCSBe4bHyeDLrXb5ziLfUma/W3NuXJ2oogiYo0m0i55JuNdE8B/3r USdzAfy00rL79N9/btkoxDonDHjFh/KKeQ8zywbDrwRaAPfvMxo7VtBBEUo7arH1ejUk wZsocSxzPXkK0U3FEv0WNjgv0k5kiR3Zx8cwu2b+ZojKAWNcdXQt9bha5j8vZkILVim2 x2qg== 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=dS7+HwdeqfFKnxrIuCj9BQIwO2c33CL1ZwPA9uioo6ATe4nI3R2EV6g58SEuHRtMAK JcRTEhR9D4/M1KKL5tlTKexFyu5TlBOA0TpkMD61XY4HrdKMXKGxOneT++ZLAo3Ue8OJ o5dF3vRRtl6Wewlc2bP/q61vPSiV/mshqPcbX2GjR2DGtqDJjigYPdikX1fpXHiF44O/ mjBie8x0tiNe6BHc6Dklx2nmWvtcjYoST6bWabB8PEBNHjatiSmF4IWMla//c2DlVbWk KSJmh40EhaowP3eHeqb5cuzrWBiA+HYLsmG5stx1QxnqQH9lx5V4e3mNB9RpriP5R7GK X3KQ== X-Gm-Message-State: APjAAAXLgbT2Kz7+8djkboECroMndZOaqp9dclQQ3sRO4WdY2gZ0sNyN HulF2hkcUGN3Y5uqSPBKjXJf X-Received: by 2002:aa7:9aea:: with SMTP id y10mr17998100pfp.16.1573835358376; Fri, 15 Nov 2019 08:29:18 -0800 (PST) Received: from localhost.localdomain ([2409:4072:6183:6d55:8418:2bbc:e6d8:2b4]) by smtp.gmail.com with ESMTPSA id y24sm12295288pfr.116.2019.11.15.08.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 08:29:17 -0800 (PST) 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 v7 1/7] clk: Zero init clk_init_data in helpers Date: Fri, 15 Nov 2019 21:58:55 +0530 Message-Id: <20191115162901.17456-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191115162901.17456-1-manivannan.sadhasivam@linaro.org> References: <20191115162901.17456-1-manivannan.sadhasivam@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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;