* [linux-next:master 11288/11658] drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:16: warning: no previous prototype for function 'amdgpu_ras_debugfs_create_ctrl_node'
@ 2021-02-17 20:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-17 20:21 UTC (permalink / raw)
To: Nirmoy Das
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Alex Deucher, Christian König
[-- Attachment #1: Type: text/plain, Size: 11191 bytes --]
Hi Nirmoy,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cd560d8023bf73c94d755908c8d4a0994dd1ec34
commit: eb14235668777baddfc77ce4f72ecfa2ea85ca55 [11288/11658] drm/amdgpu: do not keep debugfs dentry
config: s390-randconfig-r031-20210217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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/next/linux-next.git/commit/?id=eb14235668777baddfc77ce4f72ecfa2ea85ca55
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout eb14235668777baddfc77ce4f72ecfa2ea85ca55
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
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/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
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/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
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/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
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/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
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/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:16: warning: no previous prototype for function 'amdgpu_ras_debugfs_create_ctrl_node' [-Wmissing-prototypes]
struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
^
static
21 warnings generated.
vim +/amdgpu_ras_debugfs_create_ctrl_node +1140 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
1120
1121 /**
1122 * DOC: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
1123 *
1124 * Normally when there is an uncorrectable error, the driver will reset
1125 * the GPU to recover. However, in the event of an unrecoverable error,
1126 * the driver provides an interface to reboot the system automatically
1127 * in that event.
1128 *
1129 * The following file in debugfs provides that interface:
1130 * /sys/kernel/debug/dri/[0/1/2...]/ras/auto_reboot
1131 *
1132 * Usage:
1133 *
1134 * .. code-block:: bash
1135 *
1136 * echo true > .../ras/auto_reboot
1137 *
1138 */
1139 /* debugfs begin */
> 1140 struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
1141 {
1142 struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
1143 struct dentry *dir;
1144 struct drm_minor *minor = adev_to_drm(adev)->primary;
1145
1146 dir = debugfs_create_dir(RAS_FS_NAME, minor->debugfs_root);
1147 debugfs_create_file("ras_ctrl", S_IWUGO | S_IRUGO, dir, adev,
1148 &amdgpu_ras_debugfs_ctrl_ops);
1149 debugfs_create_file("ras_eeprom_reset", S_IWUGO | S_IRUGO, dir, adev,
1150 &amdgpu_ras_debugfs_eeprom_ops);
1151
1152 /*
1153 * After one uncorrectable error happens, usually GPU recovery will
1154 * be scheduled. But due to the known problem in GPU recovery failing
1155 * to bring GPU back, below interface provides one direct way to
1156 * user to reboot system automatically in such case within
1157 * ERREVENT_ATHUB_INTERRUPT generated. Normal GPU recovery routine
1158 * will never be called.
1159 */
1160 debugfs_create_bool("auto_reboot", S_IWUGO | S_IRUGO, dir, &con->reboot);
1161
1162 /*
1163 * User could set this not to clean up hardware's error count register
1164 * of RAS IPs during ras recovery.
1165 */
1166 debugfs_create_bool("disable_ras_err_cnt_harvest", 0644, dir,
1167 &con->disable_ras_err_cnt_harvest);
1168 return dir;
1169 }
1170
---
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: 38040 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-17 20:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 20:21 [linux-next:master 11288/11658] drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:16: warning: no previous prototype for function 'amdgpu_ras_debugfs_create_ctrl_node' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox