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: 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: [V3] tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate.
Date: Fri, 8 Jul 2022 12:48:16 +0800 [thread overview]
Message-ID: <202207081234.3SPgl4KO-lkp@intel.com> (raw)
In-Reply-To: <1657221457-32494-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-20220707]
[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#_base_tree_information]
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/20220708-031921
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: nios2-randconfig-r024-20220707 (https://download.01.org/0day-ci/archive/20220708/202207081234.3SPgl4KO-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.3.0
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/fbd8a1a4b7d91ea5caa048e4557ab18b0d08ea86
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/20220708-031921
git checkout fbd8a1a4b7d91ea5caa048e4557ab18b0d08ea86
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=nios2 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 >>):
In file included from include/linux/kernel.h:29,
from include/linux/clk.h:13,
from drivers/tty/serial/qcom_geni_serial.c:4:
drivers/tty/serial/qcom_geni_serial.c: In function 'get_clk_div_rate':
>> drivers/tty/serial/qcom_geni_serial.c:1006:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
1006 | pr_debug("desired_clk-%lu, ser_clk-%lu, clk_div-%lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:370:21: note: in definition of macro 'pr_fmt'
370 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:152:9: note: in expansion of macro '__dynamic_func_call'
152 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call'
162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:604:9: note: in expansion of macro 'dynamic_pr_debug'
604 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/tty/serial/qcom_geni_serial.c:1006:17: note: in expansion of macro 'pr_debug'
1006 | pr_debug("desired_clk-%lu, ser_clk-%lu, clk_div-%lu\n",
| ^~~~~~~~
drivers/tty/serial/qcom_geni_serial.c:1006:67: note: format string is defined here
1006 | pr_debug("desired_clk-%lu, ser_clk-%lu, clk_div-%lu\n",
| ~~^
| |
| long unsigned int
| %u
vim +1006 drivers/tty/serial/qcom_geni_serial.c
983
984 static unsigned long get_clk_div_rate(struct clk *clk, unsigned int baud,
985 unsigned int sampling_rate, unsigned int *clk_div)
986 {
987 unsigned long ser_clk;
988 unsigned long desired_clk;
989
990 desired_clk = baud * sampling_rate;
991 if (!desired_clk) {
992 pr_err("%s: Invalid frequency\n", __func__);
993 return 0;
994 }
995
996 /*
997 * try to find a clock rate within 2% tolerance, then within
998 */
999 ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 2);
1000 if (!ser_clk)
1001 ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 5);
1002
1003 if (!ser_clk)
1004 pr_err("Couldn't find suitable clock rate for %lu\n", desired_clk);
1005 else
> 1006 pr_debug("desired_clk-%lu, ser_clk-%lu, clk_div-%lu\n",
1007 desired_clk, ser_clk, *clk_div);
1008
1009 return ser_clk;
1010 }
1011
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-07-08 4:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 19:17 [V3] tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate Vijaya Krishna Nivarthi
2022-07-08 4:48 ` kernel test robot [this message]
2022-07-08 7:02 ` kernel test robot
2022-07-08 13:11 ` Greg KH
2022-07-11 14:22 ` Vijaya Krishna Nivarthi
2022-07-09 18:46 ` kernel test robot
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=202207081234.3SPgl4KO-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=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).