From patchwork Thu Aug 22 17:24:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 172051 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1204074ily; Thu, 22 Aug 2019 10:36:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeQqHp/a3eEPAcYQuHk1i6yh+cS1rgZ+rKtd5pZZJCCjhCToz9eIbhbuVlzkBU7UQSYAQr X-Received: by 2002:a62:6045:: with SMTP id u66mr287163pfb.261.1566495391621; Thu, 22 Aug 2019 10:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566495391; cv=none; d=google.com; s=arc-20160816; b=Uu/CBGVawXscZ2halL4s2b65KZNaK+RNPvVreiE56F0HgzpmjvHbM/c/mtfDjdZhWA k9aUB52Y5hGLQNyOwyKs6WMB97W6hW0mX5uN0sBsfJ8xykHGLJLXz8dJdx4rS9aZCaIv FnEK6AYFhU5uFGcQFbY/HU1N9VbnFh3LuJop5lL5lVmHK5j78ZPFnjTLQQ3HWVJVqvAR PYnEOBdGG/ft0Bk/5BB6Njth1r5GlP3w1j8+mlCws0QB3KHRgtDIw5TqTFr++eKgoFAh syi6qHBlv4dWQmLI8BOJutL0wbmAGiynXkxV4sn7Il5VVUzwC0hs8wTFAo+XkfjW0yxg dpxA== 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=70nxwZafCYlFjcUnZixCqBC0Lk3FuIHCQ+uw4WwvqpE=; b=xsM6WBWnn1NYjxFb52yrI6rWvLH2QUCbrORlA1rhfvizjGNPjjIWK7NOYz41o9cl6E AoxQ7hlSabQj/j0qGfLgtKa3EOq07ZR47B2AzIgQSQxRSeQSlzRrI7ab8eb8f7DJ/grZ iZXI18etlJJUCflmm8VmSknfhH0mXKnd5u9TD92N04B38XKfga26e3UaJOktkhyrr5Dy 98ApiayqdIYVv7yaq5252M9cjCSjHTh55isOBs9B6wdG3ePPsjt5/Z+5ZN9kVM4Ry0YB HN/H6/FFt/m+7Cya9ZG9qpUsuhuMWIfZxz2QJLJBIBnlQUs1jnXmGlwy1Zk0sobRnGA0 2gfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wjDlZAUy; 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 b5si3581875pgq.355.2019.08.22.10.36.31; Thu, 22 Aug 2019 10:36:31 -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=wjDlZAUy; 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 S2392499AbfHVRga (ORCPT + 8 others); Thu, 22 Aug 2019 13:36:30 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43136 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391577AbfHVRYt (ORCPT ); Thu, 22 Aug 2019 13:24:49 -0400 Received: by mail-pl1-f193.google.com with SMTP id 4so3827911pld.10 for ; Thu, 22 Aug 2019 10:24:49 -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=70nxwZafCYlFjcUnZixCqBC0Lk3FuIHCQ+uw4WwvqpE=; b=wjDlZAUyA+79EgPCGsEzncxofResf0ntanYurX8vDWxjInime4FmFm6ORYEgwqXo7z /0virIKbDYaQEaPcAP76VxXXkDOeaI3ZWvseBaGwlW07x2HlEzF8oa7tL2+Pt6itKZg6 351N80qRTQsgtn8yNEhTokgA0L4COEYnf911oeXo9EsvSgFhzUxqDXjmMkHmjh1+abNx p0YC1ybNMoWamMUui+k2D/sepRVDNSOWX9OHZcpgfAJWJ5Mf9Jv5nQ3nUNmWifGjqXiQ +BbeGYZniUPpiMqKmd14A3vzc9e1I2CBSExLbMNDdvrFOhknPEbljs91QfSqDMwWGks6 t7CA== 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=70nxwZafCYlFjcUnZixCqBC0Lk3FuIHCQ+uw4WwvqpE=; b=GgImiZD0gnffJ/RiS/f344NBFtfeNlqJvYXnNgRcxGMgRZZ4gttmGtb2X+5KIEZo6g bMQI376Hcu34CLsevoMTCoWTH7kzpU16eJhk5ch+dd4klvGbC2O73GnVQZNkpl71uyu8 ehsO1yigbn+5a+ZycAmDxDLaAOQTUDWVvdaEFgq10WTg3NrgD+Yw098XPfejMvcCFNUG kuhqZ7cATdlhmKFWyjFATe6Xt/E+ptA01djsbBqbujyqrFMFg1O7Xcs1BOAZ1JDG/BJa oB8CtZeMkR8njfXGvlSeUnEKFZLIX+4azxVDE7qmnWCMkKQyX+pDr+ux9lh1qvo48npQ 4xkA== X-Gm-Message-State: APjAAAV+u9n9GTdzZ2AIyDTOI7eH7u0A7jvgF26pljnbzzArxWjVZhu/ KRyaZjOoabKdm0++mg50LAIT X-Received: by 2002:a17:902:aa93:: with SMTP id d19mr41354972plr.148.1566494688626; Thu, 22 Aug 2019 10:24:48 -0700 (PDT) Received: from localhost.localdomain ([2405:204:71cc:5738:24ad:193e:4b59:8a76]) by smtp.gmail.com with ESMTPSA id r12sm31705798pgb.73.2019.08.22.10.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 10:24:48 -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 v4 1/8] clk: Zero init clk_init_data in helpers Date: Thu, 22 Aug 2019 22:54:19 +0530 Message-Id: <20190822172426.25879-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822172426.25879-1-manivannan.sadhasivam@linaro.org> References: <20190822172426.25879-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 b06038b8f658..4d579f9d20f6 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -208,7 +208,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 = { NULL }; 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..65dd8137f9ec 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 = { NULL }; 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..746c3ecdc5b3 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 = { NULL }; int ret; /* allocate fixed-rate clock */ diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 1b99fc962745..8ed83ec730cb 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 = { NULL }; 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..2caa6b2a9ee5 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 = { NULL }; u8 width = 0; int ret;