From: kernel test robot <lkp@intel.com>
To: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>,
agross@kernel.org, bjorn.andersson@linaro.org,
konrad.dybcio@somainline.org, gregkh@linuxfoundation.org,
jirislaby@kernel.org, linux-arm-msm@vger.kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
quic_msavaliy@quicinc.com, dianders@chromium.org,
mka@chromium.org, swboyd@chromium.org,
Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Subject: Re: [V2] tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate.
Date: Tue, 5 Jul 2022 05:20:51 +0800 [thread overview]
Message-ID: <202207050527.wrtnyin5-lkp@intel.com> (raw)
In-Reply-To: <1656496841-5853-1-git-send-email-quic_vnivarth@quicinc.com>
Hi Vijaya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on linus/master v5.19-rc5 next-20220704]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Vijaya-Krishna-Nivarthi/tty-serial-qcom-geni-serial-Fix-get_clk_div_rate-which-otherwise-could-return-a-sub-optimal-clock-rate/20220629-180330
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: hexagon-buildonly-randconfig-r006-20220703 (https://download.01.org/0day-ci/archive/20220705/202207050527.wrtnyin5-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project f7a80c3d08d4821e621fc88d6a2e435291f82dff)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/a70b5a9759aef627b6882576f38399ed8c092b74
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Vijaya-Krishna-Nivarthi/tty-serial-qcom-geni-serial-Fix-get_clk_div_rate-which-otherwise-could-return-a-sub-optimal-clock-rate/20220629-180330
git checkout a70b5a9759aef627b6882576f38399ed8c092b74
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/tty/serial/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tty/serial/qcom_geni_serial.c:1044:56: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
pr_err("Couldn't find suitable clock rate for %d\n", desired_clk);
~~ ^~~~~~~~~~~
%lu
include/linux/printk.h:523:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:480:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:452:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/tty/serial/qcom_geni_serial.c:1047:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
desired_clk, ser_clk, *clk_div);
^~~~~~~~~~~
include/linux/printk.h:610:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:131:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:480:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:452:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/tty/serial/qcom_geni_serial.c:1047:17: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
desired_clk, ser_clk, *clk_div);
^~~~~~~
include/linux/printk.h:610:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:131:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:480:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:452:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
3 warnings generated.
vim +1044 drivers/tty/serial/qcom_geni_serial.c
1021
1022 static unsigned long get_clk_div_rate(struct clk *clk, unsigned int baud,
1023 unsigned int sampling_rate, unsigned int *clk_div)
1024 {
1025 unsigned long ser_clk;
1026 unsigned long desired_clk;
1027
1028 desired_clk = baud * sampling_rate;
1029 if (!desired_clk) {
1030 pr_err("%s: Invalid frequency\n", __func__);
1031 return 0;
1032 }
1033
1034 ser_clk = 0;
1035 /*
1036 * try to find exact clock rate or within 2% tolerance,
1037 * then within 5% tolerance
1038 */
1039 ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 2, true);
1040 if (!ser_clk)
1041 ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 5, false);
1042
1043 if (!ser_clk)
> 1044 pr_err("Couldn't find suitable clock rate for %d\n", desired_clk);
1045 else
1046 pr_debug("desired_clk-%d, ser_clk-%d, clk_div-%d\n",
1047 desired_clk, ser_clk, *clk_div);
1048
1049 return ser_clk;
1050 }
1051
--
0-DAY CI Kernel Test Service
https://01.org/lkp
prev parent reply other threads:[~2022-07-04 21:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 10:00 [V2] tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate Vijaya Krishna Nivarthi
2022-06-29 23:15 ` Doug Anderson
2022-07-01 11:04 ` Vijaya Krishna Nivarthi (Temp) (QUIC)
2022-07-01 15:08 ` Doug Anderson
2022-07-04 18:57 ` Vijaya Krishna Nivarthi (Temp)
2022-07-06 15:26 ` Doug Anderson
2022-07-06 17:43 ` Vijaya Krishna Nivarthi
2022-07-06 18:21 ` Doug Anderson
2022-07-07 19:24 ` Vijaya Krishna Nivarthi
2022-06-30 15:00 ` Greg KH
2022-06-30 17:19 ` Vijaya Krishna Nivarthi (Temp) (QUIC)
2022-06-30 21:57 ` Doug Anderson
2022-07-04 21:20 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202207050527.wrtnyin5-lkp@intel.com \
--to=lkp@intel.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mka@chromium.org \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_vnivarth@quicinc.com \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).