From: kernel test robot <lkp@intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [l1k:bcm2835_spi_clkcache 1/1] drivers/spi/spi-bcm2835.c:1048:6: error: no previous prototype for 'bcm2835_spi_set_clk'
Date: Thu, 30 Sep 2021 22:04:13 +0800 [thread overview]
Message-ID: <202109302202.w6aTfsWF-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]
tree: https://github.com/l1k/linux bcm2835_spi_clkcache
head: e46f7c6c25bbb03644fd48964df89fa755e0778b
commit: e46f7c6c25bbb03644fd48964df89fa755e0778b [1/1] spi: bcm2835: Avoid unnecessary recalculation of CLK register
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/spi/spi-bcm2835.c:1048:6: error: no previous prototype for 'bcm2835_spi_set_clk' [-Werror=missing-prototypes]
1048 | void bcm2835_spi_set_clk(struct bcm2835_spi *bs, struct spi_transfer *tfr)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60763 bytes --]
reply other threads:[~2021-09-30 14:05 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=202109302202.w6aTfsWF-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.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