lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201809070658.q1aRNwTN%fengguang.wu@intel.com>
Date:   Fri, 7 Sep 2018 06:35:34 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Douglas Anderson <dianders@...omium.org>
Cc:     kbuild-all@...org, Andy Gross <andy.gross@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>, mka@...omium.org,
        girishm@...eaurora.org, dkota@...eaurora.org, evgreen@...omium.org,
        swboyd@...omium.org, Douglas Anderson <dianders@...omium.org>,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        David Brown <david.brown@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate()
 errors in geni_se_clk_tbl_get()

Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on agross/for-next]
[also build test WARNING on v4.19-rc2 next-20180906]
[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/Douglas-Anderson/soc-qcom-geni-Don-t-ignore-clk_round_rate-errors-in-geni_se_clk_tbl_get/20180907-045155
base:   https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/soc/qcom/qcom-geni-se.c: In function 'geni_se_clk_tbl_get':
>> drivers/soc/qcom/qcom-geni-se.c:531:39: warning: 'freq' may be used uninitialized in this function [-Wmaybe-uninitialized]
      freq = clk_round_rate(se->clk, freq + 1);
                                     ~~~~~^~~

vim +/freq +531 drivers/soc/qcom/qcom-geni-se.c

eddac5af Karthikeyan Ramasubramanian 2018-03-30  500  
eddac5af Karthikeyan Ramasubramanian 2018-03-30  501  /**
eddac5af Karthikeyan Ramasubramanian 2018-03-30  502   * geni_se_clk_tbl_get() - Get the clock table to program DFS
eddac5af Karthikeyan Ramasubramanian 2018-03-30  503   * @se:		Pointer to the concerned serial engine.
eddac5af Karthikeyan Ramasubramanian 2018-03-30  504   * @tbl:	Table in which the output is returned.
eddac5af Karthikeyan Ramasubramanian 2018-03-30  505   *
eddac5af Karthikeyan Ramasubramanian 2018-03-30  506   * This function is called by the protocol drivers to determine the different
eddac5af Karthikeyan Ramasubramanian 2018-03-30  507   * clock frequencies supported by serial engine core clock. The protocol
eddac5af Karthikeyan Ramasubramanian 2018-03-30  508   * drivers use the output to determine the clock frequency index to be
eddac5af Karthikeyan Ramasubramanian 2018-03-30  509   * programmed into DFS.
eddac5af Karthikeyan Ramasubramanian 2018-03-30  510   *
eddac5af Karthikeyan Ramasubramanian 2018-03-30  511   * Return: number of valid performance levels in the table on success,
eddac5af Karthikeyan Ramasubramanian 2018-03-30  512   *	   standard Linux error codes on failure.
eddac5af Karthikeyan Ramasubramanian 2018-03-30  513   */
eddac5af Karthikeyan Ramasubramanian 2018-03-30  514  int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
eddac5af Karthikeyan Ramasubramanian 2018-03-30  515  {
9747c0a2 Douglas Anderson            2018-09-06  516  	long freq;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  517  	int i;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  518  
eddac5af Karthikeyan Ramasubramanian 2018-03-30  519  	if (se->clk_perf_tbl) {
eddac5af Karthikeyan Ramasubramanian 2018-03-30  520  		*tbl = se->clk_perf_tbl;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  521  		return se->num_clk_levels;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  522  	}
eddac5af Karthikeyan Ramasubramanian 2018-03-30  523  
eddac5af Karthikeyan Ramasubramanian 2018-03-30  524  	se->clk_perf_tbl = devm_kcalloc(se->dev, MAX_CLK_PERF_LEVEL,
eddac5af Karthikeyan Ramasubramanian 2018-03-30  525  					sizeof(*se->clk_perf_tbl),
eddac5af Karthikeyan Ramasubramanian 2018-03-30  526  					GFP_KERNEL);
eddac5af Karthikeyan Ramasubramanian 2018-03-30  527  	if (!se->clk_perf_tbl)
eddac5af Karthikeyan Ramasubramanian 2018-03-30  528  		return -ENOMEM;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  529  
eddac5af Karthikeyan Ramasubramanian 2018-03-30  530  	for (i = 0; i < MAX_CLK_PERF_LEVEL; i++) {
eddac5af Karthikeyan Ramasubramanian 2018-03-30 @531  		freq = clk_round_rate(se->clk, freq + 1);
9747c0a2 Douglas Anderson            2018-09-06  532  		if (freq <= 0 || freq == se->clk_perf_tbl[i - 1])
eddac5af Karthikeyan Ramasubramanian 2018-03-30  533  			break;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  534  		se->clk_perf_tbl[i] = freq;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  535  	}
eddac5af Karthikeyan Ramasubramanian 2018-03-30  536  	se->num_clk_levels = i;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  537  	*tbl = se->clk_perf_tbl;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  538  	return se->num_clk_levels;
eddac5af Karthikeyan Ramasubramanian 2018-03-30  539  }
eddac5af Karthikeyan Ramasubramanian 2018-03-30  540  EXPORT_SYMBOL(geni_se_clk_tbl_get);
eddac5af Karthikeyan Ramasubramanian 2018-03-30  541  

:::::: The code at line 531 was first introduced by commit
:::::: eddac5af06546d2e7a0730e3dc02dde3dc91098a soc: qcom: Add GENI based QUP Wrapper driver

:::::: TO: Karthikeyan Ramasubramanian <kramasub@...eaurora.org>
:::::: CC: Andy Gross <andy.gross@...aro.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (64115 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ