[linux-next:master 3838/5952] drivers/gpu/drm/vc4/vc4_hdmi.c:196:7: error: implicit declaration of function 'gpiod_get_value_cansleep'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b593b8979eac3f6255401663fa42f3473b8f6cb1
commit: 44bd27c42a1c9a00f1fbcb58301a7f3e6f5cdd0f [3838/5952] ASoC: simple-amplifier: Remove spurious gpiolib select
config: s390-randconfig-r032-20220216 (https://download.01.org/0day-ci/archive/20220216/202202161638.Q6uhVami-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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/commi...
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 44bd27c42a1c9a00f1fbcb58301a7f3e6f5cdd0f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/gpu/drm/vc4/ sound/soc/codecs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/vc4/vc4_hdmi.c:34:
In file included from include/drm/drm_atomic_helper.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:18:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from drivers/gpu/drm/vc4/vc4_hdmi.c:34:
In file included from include/drm/drm_atomic_helper.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:18:
In file included from arch/s390/include/asm/io.h:75:
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:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from drivers/gpu/drm/vc4/vc4_hdmi.c:34:
In file included from include/drm/drm_atomic_helper.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:18:
In file included from arch/s390/include/asm/io.h:75:
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/vc4/vc4_hdmi.c:196:7: error: implicit declaration of function 'gpiod_get_value_cansleep' [-Werror,-Wimplicit-function-declaration]
if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio))
^
drivers/gpu/drm/vc4/vc4_hdmi.c:196:7: note: did you mean 'gpio_get_value_cansleep'?
include/linux/gpio.h:181:19: note: 'gpio_get_value_cansleep' declared here
static inline int gpio_get_value_cansleep(unsigned gpio)
^
>> drivers/gpu/drm/vc4/vc4_hdmi.c:2529:23: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror,-Wimplicit-function-declaration]
vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
^
drivers/gpu/drm/vc4/vc4_hdmi.c:2529:23: note: did you mean 'devm_clk_get_optional'?
include/linux/clk.h:470:13: note: 'devm_clk_get_optional' declared here
struct clk *devm_clk_get_optional(struct device *dev, const char *id);
^
>> drivers/gpu/drm/vc4/vc4_hdmi.c:2529:59: error: use of undeclared identifier 'GPIOD_IN'
vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
^
12 warnings and 3 errors generated.
--
In file included from sound/soc/codecs/tlv320adc3xxx.c:19:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from sound/soc/codecs/tlv320adc3xxx.c:19:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
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:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from sound/soc/codecs/tlv320adc3xxx.c:19:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
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);
~~~~~~~~~~ ^
>> sound/soc/codecs/tlv320adc3xxx.c:1209:21: error: implicit declaration of function 'devm_gpiod_get' [-Werror,-Wimplicit-function-declaration]
adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
^
sound/soc/codecs/tlv320adc3xxx.c:1209:21: note: did you mean 'devm_gpio_free'?
include/linux/gpio.h:243:20: note: 'devm_gpio_free' declared here
static inline void devm_gpio_free(struct device *dev, unsigned int gpio)
^
>> sound/soc/codecs/tlv320adc3xxx.c:1209:50: error: use of undeclared identifier 'GPIOD_OUT_LOW'
adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
^
>> sound/soc/codecs/tlv320adc3xxx.c:1257:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror,-Wimplicit-function-declaration]
gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);
^
sound/soc/codecs/tlv320adc3xxx.c:1257:2: note: did you mean 'gpio_set_value_cansleep'?
include/linux/gpio.h:188:20: note: 'gpio_set_value_cansleep' declared here
static inline void gpio_set_value_cansleep(unsigned gpio, int value)
^
12 warnings and 3 errors generated.
vim +/gpiod_get_value_cansleep +196 drivers/gpu/drm/vc4/vc4_hdmi.c
b7551457c5d0b3 Maxime Ripard 2021-10-25 184
c8b75bca92cbf0 Eric Anholt 2015-03-02 185 static enum drm_connector_status
c8b75bca92cbf0 Eric Anholt 2015-03-02 186 vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
c8b75bca92cbf0 Eric Anholt 2015-03-02 187 {
5dfbcae63f1098 Maxime Ripard 2020-09-03 188 struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
4d8602b8ec16f5 Dom Cobley 2021-01-11 189 bool connected = false;
c8b75bca92cbf0 Eric Anholt 2015-03-02 190
82cb88af12d29e Maxime Ripard 2021-10-25 191 mutex_lock(&vc4_hdmi->mutex);
82cb88af12d29e Maxime Ripard 2021-10-25 192
0f5251339eda7f Maxime Ripard 2021-09-22 193 WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev));
0f5251339eda7f Maxime Ripard 2021-09-22 194
e32e5723256a99 Maxime Ripard 2021-10-25 195 if (vc4_hdmi->hpd_gpio) {
e32e5723256a99 Maxime Ripard 2021-10-25 @196 if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio))
4d8602b8ec16f5 Dom Cobley 2021-01-11 197 connected = true;
81fb55e500a82a Maxime Ripard 2021-10-25 198 } else {
81fb55e500a82a Maxime Ripard 2021-10-25 199 unsigned long flags;
81fb55e500a82a Maxime Ripard 2021-10-25 200 u32 hotplug;
81fb55e500a82a Maxime Ripard 2021-10-25 201
81fb55e500a82a Maxime Ripard 2021-10-25 202 spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
81fb55e500a82a Maxime Ripard 2021-10-25 203 hotplug = HDMI_READ(HDMI_HOTPLUG);
81fb55e500a82a Maxime Ripard 2021-10-25 204 spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags);
81fb55e500a82a Maxime Ripard 2021-10-25 205
81fb55e500a82a Maxime Ripard 2021-10-25 206 if (hotplug & VC4_HDMI_HOTPLUG_CONNECTED)
4d8602b8ec16f5 Dom Cobley 2021-01-11 207 connected = true;
c8b75bca92cbf0 Eric Anholt 2015-03-02 208 }
c8b75bca92cbf0 Eric Anholt 2015-03-02 209
4d8602b8ec16f5 Dom Cobley 2021-01-11 210 if (connected) {
4d8602b8ec16f5 Dom Cobley 2021-01-11 211 if (connector->status != connector_status_connected) {
4d8602b8ec16f5 Dom Cobley 2021-01-11 212 struct edid *edid = drm_get_edid(connector, vc4_hdmi->ddc);
4d8602b8ec16f5 Dom Cobley 2021-01-11 213
4d8602b8ec16f5 Dom Cobley 2021-01-11 214 if (edid) {
4d8602b8ec16f5 Dom Cobley 2021-01-11 215 cec_s_phys_addr_from_edid(vc4_hdmi->cec_adap, edid);
4d8602b8ec16f5 Dom Cobley 2021-01-11 216 vc4_hdmi->encoder.hdmi_monitor = drm_detect_hdmi_monitor(edid);
4d8602b8ec16f5 Dom Cobley 2021-01-11 217 kfree(edid);
4d8602b8ec16f5 Dom Cobley 2021-01-11 218 }
4d8602b8ec16f5 Dom Cobley 2021-01-11 219 }
9d44abbbb8d530 Eric Anholt 2016-09-14 220
b7551457c5d0b3 Maxime Ripard 2021-10-25 221 vc4_hdmi_enable_scrambling(&vc4_hdmi->encoder.base.base);
0f5251339eda7f Maxime Ripard 2021-09-22 222 pm_runtime_put(&vc4_hdmi->pdev->dev);
82cb88af12d29e Maxime Ripard 2021-10-25 223 mutex_unlock(&vc4_hdmi->mutex);
c8b75bca92cbf0 Eric Anholt 2015-03-02 224 return connector_status_connected;
4d8602b8ec16f5 Dom Cobley 2021-01-11 225 }
4d8602b8ec16f5 Dom Cobley 2021-01-11 226
b10db9a4242bd5 Maxime Ripard 2020-09-03 227 cec_phys_addr_invalidate(vc4_hdmi->cec_adap);
0f5251339eda7f Maxime Ripard 2021-09-22 228 pm_runtime_put(&vc4_hdmi->pdev->dev);
82cb88af12d29e Maxime Ripard 2021-10-25 229 mutex_unlock(&vc4_hdmi->mutex);
c8b75bca92cbf0 Eric Anholt 2015-03-02 230 return connector_status_disconnected;
c8b75bca92cbf0 Eric Anholt 2015-03-02 231 }
c8b75bca92cbf0 Eric Anholt 2015-03-02 232
:::::: The code at line 196 was first introduced by commit
:::::: e32e5723256a99c5324824503572f743377dd0fe drm/vc4: hdmi: Fix HPD GPIO detection
:::::: TO: Maxime Ripard <maxime(a)cerno.tech>
:::::: CC: Maxime Ripard <maxime(a)cerno.tech>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:25: warning: 'strncpy' specified bound depends on the length of the source argument
by kernel test robot
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c5d9ae265b105d9a67575fb67bd4650a6fc08e25
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a net: hns3: refactor dump bd info of debugfs
date: 9 months ago
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202161610.iSAoPT4T-lk...)
compiler: alpha-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/fpga/ drivers/net/ethernet/hisilicon/hns3/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'hns3_dbg_fill_content',
inlined from 'hns3_dbg_tx_bd_info' at drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:432:2:
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'hns3_dbg_fill_content',
inlined from 'hns3_dbg_rx_bd_info' at drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:358:2:
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:25: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [PATCH v2 net-next] net: introduce SO_RCVBUFAUTO to let the rcv_buf tune automatically
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/kerneljasonxing-gmail-com/net-in...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b0471c26108160217fc17acec4a9fdce92aaeeea
config: nios2-defconfig (https://download.01.org/0day-ci/archive/20220216/202202161604.JJGbw1Fl-lk...)
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/0day-ci/linux/commit/83d2852811bd798510fe870fd596d4aad...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review kerneljasonxing-gmail-com/net-introduce-SO_RCVBUFAUTO-to-let-the-rcv_buf-tune-automatically/20220216-130549
git checkout 83d2852811bd798510fe870fd596d4aadfa87692
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/core/sock.c: In function 'sock_setsockopt':
>> net/core/sock.c:1458:9: error: duplicate case value
1458 | case SO_TXREHASH:
| ^~~~
net/core/sock.c:1125:9: note: previously used here
1125 | case SO_RCVBUFAUTO:
| ^~~~
vim +1458 net/core/sock.c
62748f32d501f5d Eric Dumazet 2013-09-24 1355
62748f32d501f5d Eric Dumazet 2013-09-24 1356 case SO_MAX_PACING_RATE:
6bdef102dae9d24 Eric Dumazet 2019-02-28 1357 {
700465fd338fe5d Ke Li 2020-10-22 1358 unsigned long ulval = (val == ~0U) ? ~0UL : (unsigned int)val;
6bdef102dae9d24 Eric Dumazet 2019-02-28 1359
6bdef102dae9d24 Eric Dumazet 2019-02-28 1360 if (sizeof(ulval) != sizeof(val) &&
6bdef102dae9d24 Eric Dumazet 2019-02-28 1361 optlen >= sizeof(ulval) &&
c8c1bbb6eb49810 Christoph Hellwig 2020-07-23 1362 copy_from_sockptr(&ulval, optval, sizeof(ulval))) {
6bdef102dae9d24 Eric Dumazet 2019-02-28 1363 ret = -EFAULT;
6bdef102dae9d24 Eric Dumazet 2019-02-28 1364 break;
6bdef102dae9d24 Eric Dumazet 2019-02-28 1365 }
6bdef102dae9d24 Eric Dumazet 2019-02-28 1366 if (ulval != ~0UL)
218af599fa635b1 Eric Dumazet 2017-05-16 1367 cmpxchg(&sk->sk_pacing_status,
218af599fa635b1 Eric Dumazet 2017-05-16 1368 SK_PACING_NONE,
218af599fa635b1 Eric Dumazet 2017-05-16 1369 SK_PACING_NEEDED);
6bdef102dae9d24 Eric Dumazet 2019-02-28 1370 sk->sk_max_pacing_rate = ulval;
6bdef102dae9d24 Eric Dumazet 2019-02-28 1371 sk->sk_pacing_rate = min(sk->sk_pacing_rate, ulval);
62748f32d501f5d Eric Dumazet 2013-09-24 1372 break;
6bdef102dae9d24 Eric Dumazet 2019-02-28 1373 }
70da268b569d32a Eric Dumazet 2015-10-08 1374 case SO_INCOMING_CPU:
7170a977743b72c Eric Dumazet 2019-10-30 1375 WRITE_ONCE(sk->sk_incoming_cpu, val);
70da268b569d32a Eric Dumazet 2015-10-08 1376 break;
70da268b569d32a Eric Dumazet 2015-10-08 1377
a87cb3e48ee86d2 Tom Herbert 2016-02-24 1378 case SO_CNX_ADVICE:
a87cb3e48ee86d2 Tom Herbert 2016-02-24 1379 if (val == 1)
a87cb3e48ee86d2 Tom Herbert 2016-02-24 1380 dst_negative_advice(sk);
a87cb3e48ee86d2 Tom Herbert 2016-02-24 1381 break;
76851d1212c1136 Willem de Bruijn 2017-08-03 1382
76851d1212c1136 Willem de Bruijn 2017-08-03 1383 case SO_ZEROCOPY:
28190752c709272 Sowmini Varadhan 2018-02-15 1384 if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6) {
42f67eea3ba36ce Eric Dumazet 2021-11-15 1385 if (!(sk_is_tcp(sk) ||
b5947e5d1e710c3 Willem de Bruijn 2018-11-30 1386 (sk->sk_type == SOCK_DGRAM &&
b5947e5d1e710c3 Willem de Bruijn 2018-11-30 1387 sk->sk_protocol == IPPROTO_UDP)))
76851d1212c1136 Willem de Bruijn 2017-08-03 1388 ret = -ENOTSUPP;
28190752c709272 Sowmini Varadhan 2018-02-15 1389 } else if (sk->sk_family != PF_RDS) {
28190752c709272 Sowmini Varadhan 2018-02-15 1390 ret = -ENOTSUPP;
28190752c709272 Sowmini Varadhan 2018-02-15 1391 }
28190752c709272 Sowmini Varadhan 2018-02-15 1392 if (!ret) {
28190752c709272 Sowmini Varadhan 2018-02-15 1393 if (val < 0 || val > 1)
76851d1212c1136 Willem de Bruijn 2017-08-03 1394 ret = -EINVAL;
76851d1212c1136 Willem de Bruijn 2017-08-03 1395 else
76851d1212c1136 Willem de Bruijn 2017-08-03 1396 sock_valbool_flag(sk, SOCK_ZEROCOPY, valbool);
28190752c709272 Sowmini Varadhan 2018-02-15 1397 }
334e6413134bf83 Jesus Sanchez-Palencia 2018-03-07 1398 break;
334e6413134bf83 Jesus Sanchez-Palencia 2018-03-07 1399
80b14dee2bea128 Richard Cochran 2018-07-03 1400 case SO_TXTIME:
790709f24972864 Eric Dumazet 2020-05-07 1401 if (optlen != sizeof(struct sock_txtime)) {
80b14dee2bea128 Richard Cochran 2018-07-03 1402 ret = -EINVAL;
790709f24972864 Eric Dumazet 2020-05-07 1403 break;
c8c1bbb6eb49810 Christoph Hellwig 2020-07-23 1404 } else if (copy_from_sockptr(&sk_txtime, optval,
80b14dee2bea128 Richard Cochran 2018-07-03 1405 sizeof(struct sock_txtime))) {
80b14dee2bea128 Richard Cochran 2018-07-03 1406 ret = -EFAULT;
790709f24972864 Eric Dumazet 2020-05-07 1407 break;
80b14dee2bea128 Richard Cochran 2018-07-03 1408 } else if (sk_txtime.flags & ~SOF_TXTIME_FLAGS_MASK) {
80b14dee2bea128 Richard Cochran 2018-07-03 1409 ret = -EINVAL;
790709f24972864 Eric Dumazet 2020-05-07 1410 break;
790709f24972864 Eric Dumazet 2020-05-07 1411 }
790709f24972864 Eric Dumazet 2020-05-07 1412 /* CLOCK_MONOTONIC is only used by sch_fq, and this packet
790709f24972864 Eric Dumazet 2020-05-07 1413 * scheduler has enough safe guards.
790709f24972864 Eric Dumazet 2020-05-07 1414 */
790709f24972864 Eric Dumazet 2020-05-07 1415 if (sk_txtime.clockid != CLOCK_MONOTONIC &&
790709f24972864 Eric Dumazet 2020-05-07 1416 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
790709f24972864 Eric Dumazet 2020-05-07 1417 ret = -EPERM;
790709f24972864 Eric Dumazet 2020-05-07 1418 break;
790709f24972864 Eric Dumazet 2020-05-07 1419 }
80b14dee2bea128 Richard Cochran 2018-07-03 1420 sock_valbool_flag(sk, SOCK_TXTIME, true);
80b14dee2bea128 Richard Cochran 2018-07-03 1421 sk->sk_clockid = sk_txtime.clockid;
80b14dee2bea128 Richard Cochran 2018-07-03 1422 sk->sk_txtime_deadline_mode =
80b14dee2bea128 Richard Cochran 2018-07-03 1423 !!(sk_txtime.flags & SOF_TXTIME_DEADLINE_MODE);
4b15c7075352668 Jesus Sanchez-Palencia 2018-07-03 1424 sk->sk_txtime_report_errors =
4b15c7075352668 Jesus Sanchez-Palencia 2018-07-03 1425 !!(sk_txtime.flags & SOF_TXTIME_REPORT_ERRORS);
80b14dee2bea128 Richard Cochran 2018-07-03 1426 break;
80b14dee2bea128 Richard Cochran 2018-07-03 1427
f5dd3d0c9638a9d David Herrmann 2019-01-15 1428 case SO_BINDTOIFINDEX:
7594888c782e735 Christoph Hellwig 2020-05-28 1429 ret = sock_bindtoindex_locked(sk, val);
f5dd3d0c9638a9d David Herrmann 2019-01-15 1430 break;
f5dd3d0c9638a9d David Herrmann 2019-01-15 1431
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1432 case SO_BUF_LOCK:
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1433 if (val & ~SOCK_BUF_LOCK_MASK) {
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1434 ret = -EINVAL;
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1435 break;
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1436 }
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1437 sk->sk_userlocks = val | (sk->sk_userlocks &
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1438 ~SOCK_BUF_LOCK_MASK);
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1439 break;
04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1440
2bb2f5fb21b0486 Wei Wang 2021-09-29 1441 case SO_RESERVE_MEM:
2bb2f5fb21b0486 Wei Wang 2021-09-29 1442 {
2bb2f5fb21b0486 Wei Wang 2021-09-29 1443 int delta;
2bb2f5fb21b0486 Wei Wang 2021-09-29 1444
2bb2f5fb21b0486 Wei Wang 2021-09-29 1445 if (val < 0) {
2bb2f5fb21b0486 Wei Wang 2021-09-29 1446 ret = -EINVAL;
2bb2f5fb21b0486 Wei Wang 2021-09-29 1447 break;
2bb2f5fb21b0486 Wei Wang 2021-09-29 1448 }
2bb2f5fb21b0486 Wei Wang 2021-09-29 1449
2bb2f5fb21b0486 Wei Wang 2021-09-29 1450 delta = val - sk->sk_reserved_mem;
2bb2f5fb21b0486 Wei Wang 2021-09-29 1451 if (delta < 0)
2bb2f5fb21b0486 Wei Wang 2021-09-29 1452 sock_release_reserved_memory(sk, -delta);
2bb2f5fb21b0486 Wei Wang 2021-09-29 1453 else
2bb2f5fb21b0486 Wei Wang 2021-09-29 1454 ret = sock_reserve_memory(sk, delta);
2bb2f5fb21b0486 Wei Wang 2021-09-29 1455 break;
2bb2f5fb21b0486 Wei Wang 2021-09-29 1456 }
2bb2f5fb21b0486 Wei Wang 2021-09-29 1457
26859240e4ee701 Akhmat Karakotov 2022-01-31 @1458 case SO_TXREHASH:
26859240e4ee701 Akhmat Karakotov 2022-01-31 1459 if (val < -1 || val > 1) {
26859240e4ee701 Akhmat Karakotov 2022-01-31 1460 ret = -EINVAL;
26859240e4ee701 Akhmat Karakotov 2022-01-31 1461 break;
26859240e4ee701 Akhmat Karakotov 2022-01-31 1462 }
cb6cd2cec799356 Akhmat Karakotov 2022-01-31 1463 /* Paired with READ_ONCE() in tcp_rtx_synack() */
cb6cd2cec799356 Akhmat Karakotov 2022-01-31 1464 WRITE_ONCE(sk->sk_txrehash, (u8)val);
26859240e4ee701 Akhmat Karakotov 2022-01-31 1465 break;
26859240e4ee701 Akhmat Karakotov 2022-01-31 1466
^1da177e4c3f415 Linus Torvalds 2005-04-16 1467 default:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1468 ret = -ENOPROTOOPT;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1469 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1470 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1471 release_sock(sk);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1472 return ret;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1473 }
2a91525c20d3aae Eric Dumazet 2009-05-27 1474 EXPORT_SYMBOL(sock_setsockopt);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1475
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[arnd-playground:set_fs-2 12/17] lib/test_lockup.c:422:13: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs-2
head: cb5b88c78bb9c229c93bf11ea66d622a3ba4bf2d
commit: 5c46fbe679aaca0b693101e743e46ba571403b7c [12/17] uaccess: fix type mismatch warnings from access_ok()
config: mips-randconfig-s031-20220216 (https://download.01.org/0day-ci/archive/20220216/202202161630.LUggdKp0-lk...)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs-2
git checkout 5c46fbe679aaca0b693101e743e46ba571403b7c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> lib/test_lockup.c:422:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gk_ptr @@ got void [noderef] __user *ptr @@
lib/test_lockup.c:422:13: sparse: expected char const *__gk_ptr
lib/test_lockup.c:422:13: sparse: got void [noderef] __user *ptr
>> lib/test_lockup.c:423:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gk_ptr @@ got void [noderef] __user * @@
lib/test_lockup.c:423:13: sparse: expected char const *__gk_ptr
lib/test_lockup.c:423:13: sparse: got void [noderef] __user *
lib/test_lockup.c:230:9: sparse: sparse: context imbalance in 'test_lock' - wrong count at exit
lib/test_lockup.c:250:25: sparse: sparse: context imbalance in 'test_unlock' - unexpected unlock
vim +422 lib/test_lockup.c
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 410
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 411 static bool test_kernel_ptr(unsigned long addr, int size)
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 412 {
5c46fbe679aaca Arnd Bergmann 2022-02-14 413 void __user *ptr = (void __user *)addr;
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 414 char buf;
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 415
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 416 if (!addr)
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 417 return false;
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 418
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 419 /* should be at least readable kernel address */
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 420 if (access_ok(ptr, 1) ||
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 421 access_ok(ptr + size - 1, 1) ||
25f12ae45fc193 Christoph Hellwig 2020-06-17 @422 get_kernel_nofault(buf, ptr) ||
25f12ae45fc193 Christoph Hellwig 2020-06-17 @423 get_kernel_nofault(buf, ptr + size - 1)) {
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 424 pr_err("invalid kernel ptr: %#lx\n", addr);
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 425 return true;
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 426 }
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 427
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 428 return false;
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 429 }
30428ef5d1e8ca Konstantin Khlebnikov 2020-04-06 430
:::::: The code at line 422 was first introduced by commit
:::::: 25f12ae45fc1931a1dce3cc59f9989a9d87834b0 maccess: rename probe_kernel_address to get_kernel_nofault
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ast-bpf:ptr 1/1] kernel/bpf/helpers.c:1395:36: warning: unused variable 'bpf_kptr_get_proto'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git ptr
head: c49309ef3e137c753d1a87de044f007655fb9958
commit: c49309ef3e137c753d1a87de044f007655fb9958 [1/1] bpf: kptr
config: hexagon-randconfig-r001-20220216 (https://download.01.org/0day-ci/archive/20220216/202202161630.kf6vptKz-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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/ast/bpf.git/commit/?id=c4...
git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast-bpf ptr
git checkout c49309ef3e137c753d1a87de044f007655fb9958
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/bpf/helpers.c:1395:36: warning: unused variable 'bpf_kptr_get_proto' [-Wunused-const-variable]
static const struct bpf_func_proto bpf_kptr_get_proto = {
^
>> kernel/bpf/helpers.c:1411:36: warning: unused variable 'bpf_kptr_xchg_proto' [-Wunused-const-variable]
static const struct bpf_func_proto bpf_kptr_xchg_proto = {
^
>> kernel/bpf/helpers.c:1433:36: warning: unused variable 'bpf_kptr_try_set_proto' [-Wunused-const-variable]
static const struct bpf_func_proto bpf_kptr_try_set_proto = {
^
3 warnings generated.
vim +/bpf_kptr_get_proto +1395 kernel/bpf/helpers.c
1394
> 1395 static const struct bpf_func_proto bpf_kptr_get_proto = {
1396 .func = bpf_kptr_get,
1397 .gpl_only = false,
1398 .ret_type = RET_PTR_TO_BTF_ID_OR_NULL,
1399 .arg1_type = ARG_PTR_TO_MAP_VALUE,
1400 };
1401
1402 BPF_CALL_2(bpf_kptr_xchg, void **, kptr, void *, ptr)
1403 {
1404 /* ptr is ptr_to_btf_id returned from bpf_*_lookup() with ptr->refcnt >= 1
1405 * or ptr == NULL.
1406 * returns ptr_to_btf_id with refcnt >= 1 or NULL
1407 */
1408 return (long) xchg(kptr, ptr);
1409 }
1410
> 1411 static const struct bpf_func_proto bpf_kptr_xchg_proto = {
1412 .func = bpf_kptr_xchg,
1413 .gpl_only = false,
1414 .ret_type = RET_PTR_TO_BTF_ID_OR_NULL,
1415 .arg1_type = ARG_PTR_TO_MAP_VALUE,
1416 };
1417
1418 BPF_CALL_3(bpf_kptr_try_set, void **, kptr, void *, ptr, int, refcnt_off)
1419 {
1420 /* ptr is ptr_to_btf_id returned from bpf_*_lookup() with ptr->refcnt >= 1
1421 * refcount_inc() has to be done before cmpxchg() because
1422 * another cpu might do bpf_kptr_xchg+release.
1423 */
1424 refcount_inc((refcount_t *)(ptr + refcnt_off));
1425 if (cmpxchg(kptr, NULL, ptr)) {
1426 /* refcnt >= 2 here */
1427 refcount_dec((refcount_t *)(ptr + refcnt_off));
1428 return -EBUSY;
1429 }
1430 return 0;
1431 }
1432
> 1433 static const struct bpf_func_proto bpf_kptr_try_set_proto = {
1434 .func = bpf_kptr_try_set,
1435 .gpl_only = false,
1436 .ret_type = RET_INTEGER,
1437 .arg1_type = ARG_PTR_TO_MAP_VALUE,
1438 .arg2_type = ARG_PTR_TO_BTF_ID,
1439 };
1440
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[hch-misc:swiotlb-init-cleanup 8/11] arch/x86/kernel/pci-dma.c:196:5: error: redefinition of 'pci_xen_swiotlb_init_late'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup
head: 03f11490b8d1f5bc33f9584ac5f16aca9d73fd6e
commit: 19fcc8038a809dc34fe5bc053aea3a6a5a143a93 [8/11] x86: remove the IOMMU table infrastructure
config: x86_64-randconfig-a005-20211003 (https://download.01.org/0day-ci/archive/20220216/202202161556.rnTSKQZz-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc swiotlb-init-cleanup
git checkout 19fcc8038a809dc34fe5bc053aea3a6a5a143a93
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/pci-dma.c: In function 'pci_iommu_alloc':
arch/x86/kernel/pci-dma.c:86:2: error: implicit declaration of function 'detect_intel_iommu' [-Werror=implicit-function-declaration]
86 | detect_intel_iommu();
| ^~~~~~~~~~~~~~~~~~
arch/x86/kernel/pci-dma.c: At top level:
>> arch/x86/kernel/pci-dma.c:196:5: error: redefinition of 'pci_xen_swiotlb_init_late'
196 | int pci_xen_swiotlb_init_late(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/xen/swiotlb-xen.h:6,
from arch/x86/kernel/pci-dma.c:19:
arch/x86/include/asm/xen/swiotlb-xen.h:8:19: note: previous definition of 'pci_xen_swiotlb_init_late' was here
8 | static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/pci_xen_swiotlb_init_late +196 arch/x86/kernel/pci-dma.c
194
195 #ifdef CONFIG_XEN
> 196 int pci_xen_swiotlb_init_late(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [PATCH] soc/qcom: use struct_size over open coded arithmetic
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.17-rc4 next-20220215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/soc-qcom-use-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c5d9ae265b105d9a67575fb67bd4650a6fc08e25
config: hexagon-randconfig-r045-20220216 (https://download.01.org/0day-ci/archive/20220216/202202161548.Pvcgszt3-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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/0day-ci/linux/commit/51dde142db132ac922a62df2932acb6f2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cgel-zte-gmail-com/soc-qcom-use-struct_size-over-open-coded-arithmetic/20220216-111200
git checkout 51dde142db132ac922a62df2932acb6f27528e99
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/soc/qcom/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/soc/qcom/apr.c:174:18: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
abuf = kzalloc((struct_size(abuf, buf, len), GFP_ATOMIC);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:193:2: note: expanded from macro 'struct_size'
__ab_c_size(count, \
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/soc/qcom/apr.c:174:58: error: expected ')'
abuf = kzalloc((struct_size(abuf, buf, len), GFP_ATOMIC);
^
drivers/soc/qcom/apr.c:174:16: note: to match this '('
abuf = kzalloc((struct_size(abuf, buf, len), GFP_ATOMIC);
^
1 warning and 1 error generated.
vim +174 drivers/soc/qcom/apr.c
160
161 static int apr_callback(struct rpmsg_device *rpdev, void *buf,
162 int len, void *priv, u32 addr)
163 {
164 struct packet_router *apr = dev_get_drvdata(&rpdev->dev);
165 struct apr_rx_buf *abuf;
166 unsigned long flags;
167
168 if (len <= APR_HDR_SIZE) {
169 dev_err(apr->dev, "APR: Improper apr pkt received:%p %d\n",
170 buf, len);
171 return -EINVAL;
172 }
173
> 174 abuf = kzalloc((struct_size(abuf, buf, len), GFP_ATOMIC);
175 if (!abuf)
176 return -ENOMEM;
177
178 abuf->len = len;
179 memcpy(abuf->buf, buf, len);
180
181 spin_lock_irqsave(&apr->rx_lock, flags);
182 list_add_tail(&abuf->node, &apr->rx_list);
183 spin_unlock_irqrestore(&apr->rx_lock, flags);
184
185 queue_work(apr->rxwq, &apr->rx_work);
186
187 return 0;
188 }
189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[deller-fbdev:for-next 51/51] drivers/video/fbdev/omap2/omapfb/dss/dss.c:1209:49: error: 'component_compare_dev' undeclared; did you mean 'component_master_del'?
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git for-next
head: 61038027aa13351c63b452a0d48c805bab1d2ce9
commit: 61038027aa13351c63b452a0d48c805bab1d2ce9 [51/51] video: fbdev: omapfb: Make use of the helper component_compare_dev
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202160743.MUYvzd9B-lk...)
compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/co...
git remote add deller-fbdev git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git
git fetch --no-tags deller-fbdev for-next
git checkout 61038027aa13351c63b452a0d48c805bab1d2ce9
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/video/fbdev/omap2/omapfb/dss/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/video/fbdev/omap2/omapfb/dss/dss.c: In function 'dss_add_child_component':
>> drivers/video/fbdev/omap2/omapfb/dss/dss.c:1209:49: error: 'component_compare_dev' undeclared (first use in this function); did you mean 'component_master_del'?
1209 | component_match_add(dev->parent, match, component_compare_dev, dev);
| ^~~~~~~~~~~~~~~~~~~~~
| component_master_del
drivers/video/fbdev/omap2/omapfb/dss/dss.c:1209:49: note: each undeclared identifier is reported only once for each function it appears in
vim +1209 drivers/video/fbdev/omap2/omapfb/dss/dss.c
1195
1196 static int dss_add_child_component(struct device *dev, void *data)
1197 {
1198 struct component_match **match = data;
1199
1200 /*
1201 * HACK
1202 * We don't have a working driver for rfbi, so skip it here always.
1203 * Otherwise dss will never get probed successfully, as it will wait
1204 * for rfbi to get probed.
1205 */
1206 if (strstr(dev_name(dev), "rfbi"))
1207 return 0;
1208
> 1209 component_match_add(dev->parent, match, component_compare_dev, dev);
1210
1211 return 0;
1212 }
1213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [RFC PATCH 3/4] NTB: EPF: support NTB transfer between PCI RC and EP connection
by kernel test robot
Hi Frank,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on jonmason-ntb/ntb-next v5.17-rc4 next-20220215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Frank-Li/NTB-function-for-PCIe-R...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220216/202202161525.BBBVV79O-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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/0day-ci/linux/commit/84bf6254010435435a8c196e30bb2d25f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Frank-Li/NTB-function-for-PCIe-RC-to-EP-connection/20220215-134115
git checkout 84bf6254010435435a8c196e30bb2d25fd22763c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/gvt/ drivers/media/i2c/ drivers/pci/endpoint/functions/ kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for function 'pci_read' [-Wmissing-prototypes]
int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
^
drivers/pci/endpoint/functions/pci-epf-vntb.c:975:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
^
static
>> drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for function 'pci_write' [-Wmissing-prototypes]
int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
^
drivers/pci/endpoint/functions/pci-epf-vntb.c:984:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
^
static
2 warnings generated.
vim +/pci_read +975 drivers/pci/endpoint/functions/pci-epf-vntb.c
974
> 975 int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
976 {
977 if (devfn == 0) {
978 memcpy(val, ((uint8_t *)pci_space) + where, size);
979 return 0;
980 }
981 return -1;
982 }
983
> 984 int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
985 {
986 return 0;
987 }
988
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months