The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: arch/mips/include/asm/mach-loongson2ef/cs5536/cs5536_mfgpt.h:29:18: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '596583' to '6759'
Date: Wed, 21 Apr 2021 16:06:52 +0800	[thread overview]
Message-ID: <202104211644.cmjfwH6P-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1fe5501ba1abf2b7e78295df73675423bd6899a0
commit: b13812ddea615b6507beef24f76540c0c1143c5c MIPS: Loongson2ef: Disable Loongson MMI instructions
date:   7 months ago
config: mips-randconfig-r016-20210421 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b13812ddea615b6507beef24f76540c0c1143c5c
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b13812ddea615b6507beef24f76540c0c1143c5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c:24:
   arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c: In function 'mfgpt_timer_set_periodic':
>> arch/mips/include/asm/mach-loongson2ef/cs5536/cs5536_mfgpt.h:29:18: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '596583' to '6759' [-Woverflow]
      29 | #define COMPARE  ((MFGPT_TICK_RATE + HZ/2) / HZ)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c:54:7: note: in expansion of macro 'COMPARE'
      54 |  outw(COMPARE, MFGPT0_CMP2); /* set comparator2 */
         |       ^~~~~~~
   arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c: At top level:
>> arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c:195:12: warning: no previous prototype for 'init_mfgpt_clocksource' [-Wmissing-prototypes]
     195 | int __init init_mfgpt_clocksource(void)
         |            ^~~~~~~~~~~~~~~~~~~~~~


vim +29 arch/mips/include/asm/mach-loongson2ef/cs5536/cs5536_mfgpt.h

71e2f4dd5a65bd Jiaxun Yang 2019-10-20  27  
71e2f4dd5a65bd Jiaxun Yang 2019-10-20  28  #define MFGPT_TICK_RATE 14318000
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 @29  #define COMPARE	 ((MFGPT_TICK_RATE + HZ/2) / HZ)
71e2f4dd5a65bd Jiaxun Yang 2019-10-20  30  

:::::: The code at line 29 was first introduced by commit
:::::: 71e2f4dd5a65bd8dbca0b77661e75eea471168f8 MIPS: Fork loongson2ef from loongson64

:::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
:::::: CC: Paul Burton <paulburton@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2021-04-21  8:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202104211644.cmjfwH6P-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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