[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109301532.UocPKrEo-lkp@intel.com>
Date: Thu, 30 Sep 2021 15:54:40 +0800
From: kernel test robot <lkp@...el.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [l1k:bcm2835_spi_clkcache 1/1] drivers/spi/spi-bcm2835.c:1048:6:
warning: no previous prototype for 'bcm2835_spi_set_clk'
tree: https://github.com/l1k/linux bcm2835_spi_clkcache
head: e46f7c6c25bbb03644fd48964df89fa755e0778b
commit: e46f7c6c25bbb03644fd48964df89fa755e0778b [1/1] spi: bcm2835: Avoid unnecessary recalculation of CLK register
config: h8300-randconfig-r023-20210930 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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/l1k/linux/commit/e46f7c6c25bbb03644fd48964df89fa755e0778b
git remote add l1k https://github.com/l1k/linux
git fetch --no-tags l1k bcm2835_spi_clkcache
git checkout e46f7c6c25bbb03644fd48964df89fa755e0778b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/spi/spi-bcm2835.c:1048:6: warning: no previous prototype for 'bcm2835_spi_set_clk' [-Wmissing-prototypes]
1048 | void bcm2835_spi_set_clk(struct bcm2835_spi *bs, struct spi_transfer *tfr)
| ^~~~~~~~~~~~~~~~~~~
vim +/bcm2835_spi_set_clk +1048 drivers/spi/spi-bcm2835.c
1047
> 1048 void bcm2835_spi_set_clk(struct bcm2835_spi *bs, struct spi_transfer *tfr)
1049 {
1050 unsigned long spi_hz = bs->speed_hz = tfr->speed_hz;
1051 unsigned long cdiv;
1052
1053 if (spi_hz >= bs->clk_hz / 2) {
1054 cdiv = 2; /* clk_hz/2 is the fastest we can go */
1055 } else if (spi_hz) {
1056 /* CDIV must be a multiple of two */
1057 cdiv = DIV_ROUND_UP(bs->clk_hz, spi_hz);
1058 cdiv += (cdiv % 2);
1059
1060 if (cdiv >= 65536)
1061 cdiv = 0; /* 0 is the slowest we can go */
1062 } else {
1063 cdiv = 0; /* 0 is the slowest we can go */
1064 }
1065
1066 tfr->effective_speed_hz = bs->effective_speed_hz =
1067 cdiv ? (bs->clk_hz / cdiv) : (bs->clk_hz / 65536);
1068
1069 bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv);
1070 }
1071
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33048 bytes)
Powered by blists - more mailing lists