From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hare-scsi-devel:scsi-result-rework 135/146] drivers/scsi/scsi_debug.c:1205:1: error: function definition is not allowed here
Date: Thu, 22 Apr 2021 11:29:52 +0800 [thread overview]
Message-ID: <202104221144.mlmFkzpH-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 12099 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-result-rework
head: 19720ea7b22b443a182646eef7edc36e32e7b515
commit: 56cfbbc9742fcafa726599c74f2d2f5c774b0557 [135/146] scsi_debug: set hostbyte before returning the result
config: s390-randconfig-r011-20210421 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d87b9b81ccb95217181ce75515c6c68bbb408ca4)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=56cfbbc9742fcafa726599c74f2d2f5c774b0557
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-result-rework
git checkout 56cfbbc9742fcafa726599c74f2d2f5c774b0557
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=s390
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 >>):
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/scsi/scsi_debug.c:1205:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1228:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1319:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1326:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1361:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1448:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1463:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1510:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1524:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1543:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1565:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1734:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1787:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1830:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1843:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1862:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1901:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:1979:1: error: function definition is not allowed here
{
^
drivers/scsi/scsi_debug.c:2130:1: error: function definition is not allowed here
{
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 warnings and 20 errors generated.
vim +1205 drivers/scsi/scsi_debug.c
fb0cc8d1c1881c Douglas Gilbert 2016-05-31 1199
fb0cc8d1c1881c Douglas Gilbert 2016-05-31 1200 /* Fetches from SCSI "data-out" buffer. Returns number of bytes fetched into
fb0cc8d1c1881c Douglas Gilbert 2016-05-31 1201 * 'arr' or -1 if error.
fb0cc8d1c1881c Douglas Gilbert 2016-05-31 1202 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1203 static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
21a6182924d531 FUJITA Tomonori 2008-03-09 1204 int arr_len)
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1205 {
21a6182924d531 FUJITA Tomonori 2008-03-09 1206 if (!scsi_bufflen(scp))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1207 return 0;
ae3d56d81507c3 Christoph Hellwig 2019-01-29 1208 if (scp->sc_data_direction != DMA_TO_DEVICE)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1209 return -1;
21a6182924d531 FUJITA Tomonori 2008-03-09 1210
21a6182924d531 FUJITA Tomonori 2008-03-09 1211 return scsi_sg_copy_to_buffer(scp, arr, arr_len);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1212 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1213
:::::: The code at line 1205 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24233 bytes --]
reply other threads:[~2021-04-22 3:29 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=202104221144.mlmFkzpH-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.