All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
@ 2018-09-06 16:32 Douglas Anderson
  2018-09-06 16:32 ` [PATCH v2 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples Douglas Anderson
  2018-09-06 22:35   ` kbuild test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Douglas Anderson @ 2018-09-06 16:32 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: mka, girishm, dkota, evgreen, swboyd, Douglas Anderson,
	linux-arm-msm, linux-soc, David Brown, linux-kernel

The function clk_round_rate() is defined to return a "long", not an
"unsigned long".  That's because it might return a negative error
code.  Change the call in geni_se_clk_tbl_get() to check for errors.

While we're at it, get rid of a useless init of "freq".

NOTE: overall the idea that we should iterate over clk_round_rate() to
try to reconstruct a table already present in the clock driver is
questionable.  Specifically:
- This method relies on "clk_round_rate()" rounding up.
- This method only works if the table is sorted and has no duplicates.
...this patch doesn't try to fix those problems, it just makes the
error handling more correct.

Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
---

Changes in v2:
- Get rid of unneeded init of "freq" (Matthias).
- Add Matthias tag.

 drivers/soc/qcom/qcom-geni-se.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index feed3db21c10..d2d97f1d7428 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -513,7 +513,7 @@ EXPORT_SYMBOL(geni_se_resources_on);
  */
 int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
 {
-	unsigned long freq = 0;
+	long freq;
 	int i;
 
 	if (se->clk_perf_tbl) {
@@ -529,7 +529,7 @@ int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
 
 	for (i = 0; i < MAX_CLK_PERF_LEVEL; i++) {
 		freq = clk_round_rate(se->clk, freq + 1);
-		if (!freq || freq == se->clk_perf_tbl[i - 1])
+		if (freq <= 0 || freq == se->clk_perf_tbl[i - 1])
 			break;
 		se->clk_perf_tbl[i] = freq;
 	}
-- 
2.19.0.rc1.350.ge57e33dbd1-goog

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples
  2018-09-06 16:32 [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() Douglas Anderson
@ 2018-09-06 16:32 ` Douglas Anderson
  2018-09-06 22:35   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: Douglas Anderson @ 2018-09-06 16:32 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: mka, girishm, dkota, evgreen, swboyd, Douglas Anderson,
	linux-arm-msm, linux-soc, David Brown, linux-kernel

The geni_se_clk_freq_match() has some strange semantics.  Specifically
it is defined with two modes:
1. It can find a clock that's an exact multiple of the requested rate
2. It can find a non-exact match but it can't handle multiples then

...but callers should always be able to handle a clock that is a
multiple of the requested clock so mode #2 doesn't really make sense.
Let's change the semantics so that the non-exact match can also accept
multiples and then change the code to handle that.

The only caller of this code is the unlanded SPI driver [1] which
currently passes "exact = True", thus it should be safe to change the
semantics in this way.  ...and, in fact, the SPI driver should likely
be modified to pass "exact = False" (with the new semantics) since
that will allow it to work with SPI devices that request a clock rate
that doesn't exactly match a rate we can make.

[1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dkota@codeaurora.org

Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
---

Changes in v2:
- Init best_delta to ULONG_MAX and avoid extra test (Matthias).
- s/If/It in commit message.
- Add Matthias tag.

 drivers/soc/qcom/qcom-geni-se.c | 37 ++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index d2d97f1d7428..033bd56edcbb 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -544,16 +544,17 @@ EXPORT_SYMBOL(geni_se_clk_tbl_get);
  * @se:		Pointer to the concerned serial engine.
  * @req_freq:	Requested clock frequency.
  * @index:	Index of the resultant frequency in the table.
- * @res_freq:	Resultant frequency which matches or is closer to the
- *		requested frequency.
+ * @res_freq:	Resultant frequency of the source clock.
  * @exact:	Flag to indicate exact multiple requirement of the requested
  *		frequency.
  *
- * This function is called by the protocol drivers to determine the matching
- * or exact multiple of the requested frequency, as provided by the serial
- * engine clock in order to meet the performance requirements. If there is
- * no matching or exact multiple of the requested frequency found, then it
- * selects the closest floor frequency, if exact flag is not set.
+ * This function is called by the protocol drivers to determine the best match
+ * of the requested frequency as provided by the serial engine clock in order
+ * to meet the performance requirements.
+ *
+ * If we return success:
+ * - if @exact is true  then @res_freq / <an_integer> == @req_freq
+ * - if @exact is false then @res_freq / <an_integer> <= @req_freq
  *
  * Return: 0 on success, standard Linux error codes on failure.
  */
@@ -564,6 +565,9 @@ int geni_se_clk_freq_match(struct geni_se *se, unsigned long req_freq,
 	unsigned long *tbl;
 	int num_clk_levels;
 	int i;
+	unsigned long best_delta;
+	unsigned long new_delta;
+	unsigned int divider;
 
 	num_clk_levels = geni_se_clk_tbl_get(se, &tbl);
 	if (num_clk_levels < 0)
@@ -572,18 +576,21 @@ int geni_se_clk_freq_match(struct geni_se *se, unsigned long req_freq,
 	if (num_clk_levels == 0)
 		return -EINVAL;
 
-	*res_freq = 0;
+	best_delta = ULONG_MAX;
 	for (i = 0; i < num_clk_levels; i++) {
-		if (!(tbl[i] % req_freq)) {
+		divider = DIV_ROUND_UP(tbl[i], req_freq);
+		new_delta = req_freq - tbl[i] / divider;
+		if (new_delta < best_delta) {
+			/* We have a new best! */
 			*index = i;
 			*res_freq = tbl[i];
-			return 0;
-		}
 
-		if (!(*res_freq) || ((tbl[i] > *res_freq) &&
-				     (tbl[i] < req_freq))) {
-			*index = i;
-			*res_freq = tbl[i];
+			/* If the new best is exact then we're done */
+			if (new_delta == 0)
+				return 0;
+
+			/* Record how close we got */
+			best_delta = new_delta;
 		}
 	}
 
-- 
2.19.0.rc1.350.ge57e33dbd1-goog

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
  2018-09-06 16:32 [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() Douglas Anderson
@ 2018-09-06 22:35   ` kbuild test robot
  2018-09-06 22:35   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-09-06 22:35 UTC (permalink / raw)
  Cc: kbuild-all, Andy Gross, Bjorn Andersson, mka, girishm, dkota,
	evgreen, swboyd, Douglas Anderson, linux-arm-msm, linux-soc,
	David Brown, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5055 bytes --]

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@codeaurora.org>
:::::: CC: Andy Gross <andy.gross@linaro.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 64115 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
@ 2018-09-06 22:35   ` kbuild test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-09-06 22:35 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: kbuild-all, Andy Gross, Bjorn Andersson, mka, girishm, dkota,
	evgreen, swboyd, Douglas Anderson, linux-arm-msm, linux-soc,
	David Brown, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5055 bytes --]

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@codeaurora.org>
:::::: CC: Andy Gross <andy.gross@linaro.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 64115 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
  2018-09-06 22:35   ` kbuild test robot
  (?)
@ 2018-09-06 22:39   ` Doug Anderson
  2018-09-06 22:40     ` Matthias Kaehlcke
  -1 siblings, 1 reply; 6+ messages in thread
From: Doug Anderson @ 2018-09-06 22:39 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Andy Gross, Bjorn Andersson, Matthias Kaehlcke,
	Girish Mahadevan, Dilip Kota, Evan Green, Stephen Boyd,
	linux-arm-msm, open list:ARM/QUALCOMM SUPPORT, David Brown, LKML

Hi

On Thu, Sep 6, 2018 at 3:35 PM, kbuild test robot <lkp@intel.com> wrote:
> 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);
>                                      ~~~~~^~~

Oh crud.  Yeah.  ...so v1 was right after all.  :(

-Doug

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
  2018-09-06 22:39   ` Doug Anderson
@ 2018-09-06 22:40     ` Matthias Kaehlcke
  0 siblings, 0 replies; 6+ messages in thread
From: Matthias Kaehlcke @ 2018-09-06 22:40 UTC (permalink / raw)
  To: Doug Anderson
  Cc: kbuild test robot, kbuild-all, Andy Gross, Bjorn Andersson,
	Girish Mahadevan, Dilip Kota, Evan Green, Stephen Boyd,
	linux-arm-msm, open list:ARM/QUALCOMM SUPPORT, David Brown, LKML

On Thu, Sep 06, 2018 at 03:39:04PM -0700, Doug Anderson wrote:
> Hi
> 
> On Thu, Sep 6, 2018 at 3:35 PM, kbuild test robot <lkp@intel.com> wrote:
> > 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);
> >                                      ~~~~~^~~
> 
> Oh crud.  Yeah.  ...so v1 was right after all.  :(

Sorry about the misguided suggestion :/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-06 22:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06 16:32 [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() Douglas Anderson
2018-09-06 16:32 ` [PATCH v2 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples Douglas Anderson
2018-09-06 22:35 ` [PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() kbuild test robot
2018-09-06 22:35   ` kbuild test robot
2018-09-06 22:39   ` Doug Anderson
2018-09-06 22:40     ` Matthias Kaehlcke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.