From patchwork Mon Sep 16 16:14:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 173865 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp4090596oce; Mon, 16 Sep 2019 09:15:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJJLiGBvaSiNr5jY83LuAazoML8z6ZvIlnrn/K2y4vDUsjb9NwAz2wLUUjlhlqr/73LSpY X-Received: by 2002:a17:906:f6d1:: with SMTP id jo17mr827672ejb.62.1568650512803; Mon, 16 Sep 2019 09:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568650512; cv=none; d=google.com; s=arc-20160816; b=T57iQ+tr2kb6TePLXRXNlyWv/03/gwW3S/ZVsDD0CRvPsP4b/jn7PaHtuGTx2zmQsP v1fh71RLBvbL9xPZF1JZrhNlEOhmO9VCJ5FLG5Y3V+OfCMwZvjHEuoZOxsgNc2fd+qh4 B57fT8dX4p/l25oKIpkLZz30mEIJt4ZaUptXU/qsJMQX+WnqxUW6QRHioh+K1Wyt0Z0a YIMOK0wjwXCsP9YgHkYN6qqkTZr8EJaj9S8z21hE88t6ImUKUEhCYnlXz4jGRNr9sGMW fX1pQOcGXIGqvYeW/8sxzJm72bRc1BP+zIjtX39DmQAZvK6/BT7DEqgyJ2MTk/hn9xaL Xq+A== 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=riYD0GY171gq2hpC0Rvud9r+/0Siy2577Bh5MV4/Mw3jDbd86xiRUskmQjf3L8FuEU OAeHv6PUGlhbeBgyzvBwZSCfMg4uasYUnLm1Hux1Y7XoqLbhH0gkNKhD4kzfM5CaZvEm hBw41fSeD+zf0myIU7O22j+AKlVOLlKqgdtKMnSrwIyYZh93VgCduTY9SvoLqwZ+e8on oaohZiE8/SRlcCc2QhWwZjBOwRsiMKBNU/RKv+fCrgypbaRFe0kkQ2d4UMYOI3StAPp1 2g86A4n9vqcpT8ePpLyaIWJIFGj15TjKCcTw7Rw2ulwmARkue45fD3nWDTNmm3hkeVcT a8BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A1ugiOOP; 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 k14si20117734ejg.91.2019.09.16.09.15.12; Mon, 16 Sep 2019 09:15:12 -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=A1ugiOOP; 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 S2389774AbfIPQPJ (ORCPT + 27 others); Mon, 16 Sep 2019 12:15:09 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43716 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389705AbfIPQPG (ORCPT ); Mon, 16 Sep 2019 12:15:06 -0400 Received: by mail-pf1-f193.google.com with SMTP id a2so171118pfo.10 for ; Mon, 16 Sep 2019 09:15:06 -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=A1ugiOOPB7IojLFg9zG7Z22Pk5Hy1X6F1BvfvZbhB4LvJPypy+NTg/ATLcqMSTnN29 cvS5V6/R4wanwOaOkFhUCdel4TZ/BNMZSNfWvTHyUtWJwqprpL/CXF1cbtGl6P5Ijj1f FHctexMt1/Bo9pShonbRxtdHV3xU0Lahg4ss4Xufa7DfP1GfsKtHF0CAUK6TcXS7LOBl tHZEDtDJcffi/YKAr5jdQXuCIia6TqGCeFAzAwh2R9lXiq8rdjJ0I1cwH/E86NMPEj/r PFSYcus9YyaJVpMdVPF4T60PAWtBxTdiN73uiyQOGe1IDLySZX7+7PnOFxraTdxunT75 ctoQ== 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=lfTyPnJJrCBVtaC2gJnF2rijs08UmLdfwz8l+2zIDQgbLfbPPRwDmCLqqznKs7q00t vEasm4Qbo61eTEgNY0IzMD32NsPwbHE5VmKB+ObGSh/CnB5UYMtbp+ZQJQ80U5OKc/n1 7/KPWzzzqIHl4roGiof3xEVQeNxBFpeMpXByOYyrBMO1jODpMPjM3XWBCKDDVVg/t11p H11wTOoGpLOWHTsSRCbFFVVhGx4F/kS7VYY5fc5vIOA+piGSsqa3FF8eh9dC/QMaQIuD K/tmePyCMcbd4Mtq6KjLw/HeYoUKPHpsgfODcOvbBySUOFVxFuaIeYwR79uqGTiJ3FMt 3S9w== X-Gm-Message-State: APjAAAV6l6C/hPYCnC4JyjweRwo2qzDFeQrvsdKD9KLJQk15bRL/1W3K dqdf6Cpdy+hMzLmjnb60q12w X-Received: by 2002:a17:90a:db04:: with SMTP id g4mr502843pjv.51.1568650506251; Mon, 16 Sep 2019 09:15:06 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:90b:91ce:94c2:ef93:5bd:cfe8]) by smtp.gmail.com with ESMTPSA id h66sm614134pjb.0.2019.09.16.09.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 09:15:05 -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 v5 1/8] clk: Zero init clk_init_data in helpers Date: Mon, 16 Sep 2019 21:44:40 +0530 Message-Id: <20190916161447.32715-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190916161447.32715-1-manivannan.sadhasivam@linaro.org> References: <20190916161447.32715-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;