From patchwork Sat Aug 17 18:36:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 171543 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp990412ily; Sat, 17 Aug 2019 11:37:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6Lhdikd+UPFVEzroag4XKDBVliUrnuXQEO755+EnM7OxaX8VRMGpRytP+0Ers2ioRalQ6 X-Received: by 2002:a17:902:74c4:: with SMTP id f4mr14417832plt.13.1566067039661; Sat, 17 Aug 2019 11:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566067039; cv=none; d=google.com; s=arc-20160816; b=Of9jXK0vwUFtfuWRQNlAz5JmTBDjZa+Vr58e+IRcd/QNTEQQ3OUfLJ/n2PM4qXINnp 5MRAehi/Fi+e1KDAwLlt4CuWLqMosryvVmk9gcs25LULu5IQwbta4ZVxeH/cHxO5UguM s68ZctpsH1WDzsydt8Oyf+WkeD7b2ptYooO/BkE9/XBy5pHa18UMwqO1TxI7noUowHLW P9cP3Aclu9nTA4fxF4vTeUFm/OguU74+dE229VMKgXjPtJtbhcH/3ZXD9j3CCNkZN2tT RwSdwY/cl9aKDzWRP8GrL5STfEHXj0VNqmN9cl8IFJ4lfj3DCWkuMXh/WkJ19qwBeJeE INaQ== 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=mLZVZZXuDL1zBCWbZBoQIkc/pf/FuCAFjUiDa37y+jfvZlifS2WHgfO74hdUpzmTWa luu+Wjc5CrJC0T3BI+0vC73qTQfC34395WCLWpK3b5IZtA6FqkiwD5aBmgA3Pg4P+0Hv mK5SMX+RHlAWRKX2X8opFvp3jA+WAjW6DMxk95gVXmjyvZCy2SHOlMfoC/0o/R3fc0z2 XrOMzFyLAv12AFNIUDQtRx7DZW2Bq9nWrLRa1m6fXPZU05dlZSbzVSKRCJPfYaw1gGoD hcIuzdvdoPQqGUNx+z7u9ZWEVVGoJCFPovIe2EcoBtT+2cfmNE4ajmWRnGisMV363/rC vVWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ewzPkNyB; 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 w19si5442427pfi.248.2019.08.17.11.37.19; Sat, 17 Aug 2019 11:37:19 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ewzPkNyB; 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 S1726534AbfHQShS (ORCPT + 28 others); Sat, 17 Aug 2019 14:37:18 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41151 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfHQShR (ORCPT ); Sat, 17 Aug 2019 14:37:17 -0400 Received: by mail-pf1-f193.google.com with SMTP id 196so4801310pfz.8 for ; Sat, 17 Aug 2019 11:37:16 -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=ewzPkNyBhU4d9d5GhkPbSPGovE1vgDCdth74QZAq1r+/vMTb1o9o3DxSqMeS2tdFKA C1Sjun1kcy++u3Y0JYUo9na9qIphqFKJe8/Fsb4x2+5B3RDXKdMLlh/hbtP56sHGT5F9 8o2aZSHCq4DbMoJJ0O00X3EZaW6mJO/yWmoZe2nofvuJNs633XHapwvEonzOkUw0lrHO S0MgAtpyfQmP7bqvgbiP8WPKaRHAmuREnzrttpIsrXNQuFzu9IXR+WH6sJxjwz0GSOyU XeZS6V4dYx4MipPyuMKzqpjDDqWnpwYZvh2TGBYsNLAn0kUhe2YDYgA9rCjhL9Jhsbdc 8cmw== 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=NBSN4l5yocx5uXFSTa6BeRJnnc4aKfDEf6rZSAKmQozfy6Rd6xDkCzT9qSnp6EhAcx aXyFvTsL0fyQx6h85EemVfYZDnRPgjP02JRQeApRfEhq9/5leuyXu52XVcQ5vlkdhiIp LFb0kcyEARamqqmBWcblgcf6lg9dPZSMVykCaFr0NyIR7iOCFQt5AGekHQrG500MwL6w 7jebTHkqPvkfmjaZPig+fpYExg/yL62SDHR0aj8nG2eLTV7LcA9bSe2GT8hXil5jc+yL QP/XaU5S0z1HmwW7SIoKxpt1EnVMHcLOm9OBqbA31RrDWv61Y2bBg4MY5JD/kDy0uzkV 6Z/Q== X-Gm-Message-State: APjAAAVOV5qVESvpptlRhMaojUWEM+ZTXuSNoj92Ud5qiH4dUcLMrquP G77J6zBsAktP7rB8RLWUFJy8 X-Received: by 2002:a17:90a:2069:: with SMTP id n96mr12892621pjc.4.1566067036517; Sat, 17 Aug 2019 11:37:16 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:909:4559:9185:a772:a21d:70ac]) by smtp.gmail.com with ESMTPSA id 33sm8588640pgy.22.2019.08.17.11.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 11:37:16 -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 v2 7/7] clk: Zero init clk_init_data in helpers Date: Sun, 18 Aug 2019 00:06:14 +0530 Message-Id: <20190817183614.8429-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190817183614.8429-1-manivannan.sadhasivam@linaro.org> References: <20190817183614.8429-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 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;