Received: by 10.192.165.148 with SMTP id m20csp720885imm; Fri, 4 May 2018 05:29:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq1uGxdYAuG4siugwa+6B22M5sGJKpMZJK/avGzWbESrZIYpBkI3L9/wGl8Hj8RPO4s1QHk X-Received: by 2002:a63:4384:: with SMTP id q126-v6mr21911186pga.294.1525436981273; Fri, 04 May 2018 05:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525436981; cv=none; d=google.com; s=arc-20160816; b=nhgYDWR28FttPSQeSNDhf0SETf3xEz+9l6D2V7+5wvXDBDmbL3HJQDZPnN4u9sX40J KwPIKqfTzntKzqsdgqM1iV3KyDBRpR/XqMOeGt/JaVrNCcqL6Vmut6HBjdRQnOWmRsX+ kSznwX3jNt/RKo5fYAaQBzs+I65Gv92syLxMrubeyvv6QV4i9FYcSBYUJfiN4HPztzo+ j8FNHPs483w6hoye+Nfo5uYfCEVKeL8mseqCV6bBXMadpGZ0YRyxQBI1BcV9ge2ZJcPR 84N29lraQ/zEicwX28dvQ2wkX+DBbf40x/6ZwfQcSGbgDlAx3Muw1OnlAg7Lyd1nk5v8 Mjvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+AMlLTp0i9G+gMDAq8VWhDR8g/8BmU5LKmynfF2A7Vg=; b=OLHUkiLG2Qkka4t3wmSBQ42U1l/obeUyee0xdj9PMHx5xQrUD0fTyV4G3YO2OrAqvK 8BgIBn8wFHvqdPYBdXHMgVSRMZKQyQsxrLWff9XGyMbdsB/CWOm5W4Vb8+kAJkFC+8hN rZVqEN9AGy22ccKTw9IouDt23j71WWdkgP4og0DJ2uxmBbm9bA0fCbGMys7t4RO7PpqZ dmVbFAlcm4vyanxv3ztU6xF5i+X7yDH09VK1uVVqj5j6MUTQPKkiJUQeFyOe5ET7DLKs tDzGG/cTA91ePppjNWXJyCdKy27YGYmQnCMoolyNa93FMs/TD2lJmmaxXMaS6QWpibKF bK1Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si13308739pgi.135.2018.05.04.05.29.27; Fri, 04 May 2018 05:29:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492AbeEDM3A (ORCPT + 99 others); Fri, 4 May 2018 08:29:00 -0400 Received: from mga06.intel.com ([134.134.136.31]:47667 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbeEDM24 (ORCPT ); Fri, 4 May 2018 08:28:56 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 05:28:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,362,1520924400"; d="scan'208";a="37425912" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga008.fm.intel.com with ESMTP; 04 May 2018 05:28:51 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1fEZpT-000OfM-57; Fri, 04 May 2018 20:28:51 +0800 Date: Fri, 4 May 2018 20:27:56 +0800 From: kbuild test robot To: Ilia Lin Cc: kbuild-all@01.org, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, ilialin@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: Re: [PATCH v5 03/14] clk: qcom: Add CPU clock driver for msm8996 Message-ID: <201805042040.jFAZvC33%fengguang.wu@intel.com> References: <1525348355-25471-4-git-send-email-ilialin@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525348355-25471-4-git-send-email-ilialin@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ilia, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on clk/clk-next] [also build test WARNING on v4.17-rc3 next-20180503] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ilia-Lin/CPU-scaling-support-for-msm8996/20180504-174840 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/clk/qcom/clk-cpu-8996.c:142:9: sparse: constant 2150400000 is so big it is long >> drivers/clk/qcom/clk-cpu-8996.c:239:22: sparse: symbol 'clk_cpu_8996_mux_ops' was not declared. Should it be static? drivers/clk/qcom/clk-cpu-8996.c:324:19: sparse: symbol 'clks' was not declared. Should it be static? vim +142 drivers/clk/qcom/clk-cpu-8996.c 137 138 static const struct pll_vco alt_pll_vco_modes[] = { 139 VCO(3, 250000000, 500000000), 140 VCO(2, 500000000, 750000000), 141 VCO(1, 750000000, 1000000000), > 142 VCO(0, 1000000000, 2150400000), 143 }; 144 145 static const struct alpha_pll_config altpll_config = { 146 .l = 16, 147 .vco_val = 0x3 << 20, 148 .vco_mask = 0x3 << 20, 149 .config_ctl_val = 0x4001051b, 150 .post_div_mask = 0x3 << 8, 151 .post_div_val = 0x1, 152 .main_output_mask = BIT(0), 153 .early_output_mask = BIT(3), 154 }; 155 156 static struct clk_alpha_pll perfcl_alt_pll = { 157 .offset = 0x80100, 158 .regs = alt_pll_regs, 159 .vco_table = alt_pll_vco_modes, 160 .num_vco = ARRAY_SIZE(alt_pll_vco_modes), 161 .flags = SUPPORTS_OFFLINE_REQ | SUPPORTS_FSM_MODE, 162 .clkr.hw.init = &(struct clk_init_data) { 163 .name = "perfcl_alt_pll", 164 .parent_names = (const char *[]){ "xo" }, 165 .num_parents = 1, 166 .ops = &clk_alpha_pll_hwfsm_ops, 167 }, 168 }; 169 170 static struct clk_alpha_pll pwrcl_alt_pll = { 171 .offset = 0x100, 172 .regs = alt_pll_regs, 173 .vco_table = alt_pll_vco_modes, 174 .num_vco = ARRAY_SIZE(alt_pll_vco_modes), 175 .flags = SUPPORTS_OFFLINE_REQ | SUPPORTS_FSM_MODE, 176 .clkr.hw.init = &(struct clk_init_data) { 177 .name = "pwrcl_alt_pll", 178 .parent_names = (const char *[]){ "xo" }, 179 .num_parents = 1, 180 .ops = &clk_alpha_pll_hwfsm_ops, 181 }, 182 }; 183 184 /* Mux'es */ 185 186 struct clk_cpu_8996_mux { 187 u32 reg; 188 u8 shift; 189 u8 width; 190 struct clk_hw *pll; 191 struct clk_regmap clkr; 192 }; 193 194 static inline 195 struct clk_cpu_8996_mux *to_clk_cpu_8996_mux_hw(struct clk_hw *hw) 196 { 197 return container_of(to_clk_regmap(hw), struct clk_cpu_8996_mux, clkr); 198 } 199 200 static u8 clk_cpu_8996_mux_get_parent(struct clk_hw *hw) 201 { 202 u32 val; 203 struct clk_regmap *clkr = to_clk_regmap(hw); 204 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); 205 u32 mask = (u32)GENMASK(cpuclk->width - 1, 0); 206 207 regmap_read(clkr->regmap, cpuclk->reg, &val); 208 val >>= (u32)(cpuclk->shift); 209 210 return (u8)(val & mask); 211 } 212 213 static int clk_cpu_8996_mux_set_parent(struct clk_hw *hw, u8 index) 214 { 215 u32 val; 216 struct clk_regmap *clkr = to_clk_regmap(hw); 217 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); 218 unsigned int mask = GENMASK(cpuclk->width + cpuclk->shift - 1, 219 cpuclk->shift); 220 221 val = (u32)index; 222 val <<= (u32)(cpuclk->shift); 223 224 return regmap_update_bits(clkr->regmap, cpuclk->reg, mask, val); 225 } 226 227 static int 228 clk_cpu_8996_mux_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) 229 { 230 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); 231 struct clk_hw *parent = cpuclk->pll; 232 233 req->best_parent_rate = clk_hw_round_rate(parent, req->rate); 234 req->best_parent_hw = parent; 235 236 return 0; 237 } 238 > 239 const struct clk_ops clk_cpu_8996_mux_ops = { 240 .set_parent = clk_cpu_8996_mux_set_parent, 241 .get_parent = clk_cpu_8996_mux_get_parent, 242 .determine_rate = clk_cpu_8996_mux_determine_rate, 243 }; 244 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation