[pinctrl:devel 63/64] drivers/pinctrl/mediatek/pinctrl-mt6779.c:775:1: error: type defaults to 'int' in declaration of 'arch_initcall'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head: d9ce0e9fdfd37d45f669b831d0c084a7c9338ee8
commit: e6f744c6ad4fb3b7ac06d4e22b79e435578a6d54 [63/64] pinctrl: mediatek: add pinctrl support for MT6779 SoC
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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
git checkout e6f744c6ad4fb3b7ac06d4e22b79e435578a6d54
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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/pinctrl/mediatek/pinctrl-mt6779.c:775:1: warning: data definition has no type or storage class
775 | arch_initcall(mt6779_pinctrl_init);
| ^~~~~~~~~~~~~
>> drivers/pinctrl/mediatek/pinctrl-mt6779.c:775:1: error: type defaults to 'int' in declaration of 'arch_initcall' [-Werror=implicit-int]
>> drivers/pinctrl/mediatek/pinctrl-mt6779.c:775:1: warning: parameter names (without types) in function declaration
drivers/pinctrl/mediatek/pinctrl-mt6779.c:771:19: warning: 'mt6779_pinctrl_init' defined but not used [-Wunused-function]
771 | static int __init mt6779_pinctrl_init(void)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +775 drivers/pinctrl/mediatek/pinctrl-mt6779.c
770
771 static int __init mt6779_pinctrl_init(void)
772 {
773 return platform_driver_register(&mt6779_pinctrl_driver);
774 }
> 775 arch_initcall(mt6779_pinctrl_init);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:sockptr 46/46] net/mptcp/protocol.c:1659:45: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git sockptr
head: 65b86d5658a5bbb84fe436c27cf60a6efb6b5303
commit: 65b86d5658a5bbb84fe436c27cf60a6efb6b5303 [46/46] net: pass a sockptr_t into ->setsockopt
config: i386-randconfig-s002-20200716 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 65b86d5658a5bbb84fe436c27cf60a6efb6b5303
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
>> net/mptcp/protocol.c:1659:45: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void [noderef] __user *p @@ got union sockptr_t [usertype] optval @@
>> net/mptcp/protocol.c:1659:45: sparse: expected void [noderef] __user *p
>> net/mptcp/protocol.c:1659:45: sparse: got union sockptr_t [usertype] optval
net/mptcp/protocol.c:1531:24: sparse: sparse: context imbalance in 'mptcp_sk_clone' - unexpected unlock
--
net/decnet/af_decnet.c:1325:27: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1325:27: sparse: sparse: got optval
net/decnet/af_decnet.c:1340:9: sparse: sparse: Trying to use reserved word 'return' as identifier
net/decnet/af_decnet.c:1340:16: sparse: sparse: Expected ; at end of declaration
net/decnet/af_decnet.c:1340:16: sparse: sparse: got err
net/decnet/af_decnet.c:1341:1: sparse: sparse: Expected ; at the end of type declaration
net/decnet/af_decnet.c:1341:1: sparse: sparse: got }
net/decnet/af_decnet.c:1360:20: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1360:20: sparse: sparse: got &&
net/decnet/af_decnet.c:1360:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1363:20: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1363:20: sparse: sparse: got >
net/decnet/af_decnet.c:1363:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1366:30: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1366:30: sparse: sparse: got (
net/decnet/af_decnet.c:1366:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1369:9: sparse: sparse: Trying to use reserved word 'switch' as identifier
net/decnet/af_decnet.c:1370:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1383:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1385:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1397:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1399:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1414:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1416:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1429:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1431:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1438:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1445:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1447:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1457:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1459:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1466:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1468:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1475:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1477:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1485:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1487:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1493:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1495:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1496:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1497:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1498:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1502:9: sparse: sparse: Trying to use reserved word 'return' as identifier
net/decnet/af_decnet.c:1502:16: sparse: sparse: Expected ; at end of declaration
net/decnet/af_decnet.c:1502:16: sparse: sparse: got 0
net/decnet/af_decnet.c:1503:1: sparse: sparse: Expected ; at the end of type declaration
net/decnet/af_decnet.c:1503:1: sparse: sparse: got }
net/decnet/af_decnet.c:1528:9: sparse: sparse: Trying to use reserved word 'return' as identifier
net/decnet/af_decnet.c:1528:16: sparse: sparse: Expected ; at end of declaration
net/decnet/af_decnet.c:1528:16: sparse: sparse: got err
net/decnet/af_decnet.c:1529:1: sparse: sparse: Expected ; at the end of type declaration
net/decnet/af_decnet.c:1529:1: sparse: sparse: got }
net/decnet/af_decnet.c:1540:12: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1540:12: sparse: sparse: got (
net/decnet/af_decnet.c:1540:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1540:12: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1540:12: sparse: sparse: got "net/decnet/af_decnet.c"
net/decnet/af_decnet.c:1540:12: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1540:12: sparse: sparse: got ,
net/decnet/af_decnet.c:1540:12: sparse: sparse: Expected ; at the end of type declaration
net/decnet/af_decnet.c:1540:12: sparse: sparse: got }
net/decnet/af_decnet.c:1543:9: sparse: sparse: Trying to use reserved word 'switch' as identifier
net/decnet/af_decnet.c:1544:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1548:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1550:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1554:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1556:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1560:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1562:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1566:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1568:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1590:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1592:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1596:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1598:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1603:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1605:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1610:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1612:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1616:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1618:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1622:17: sparse: sparse: break/continue not in iterator scope
net/decnet/af_decnet.c:1624:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1625:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1626:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1627:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1628:9: sparse: sparse: not in switch scope
net/decnet/af_decnet.c:1632:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1639:9: sparse: sparse: Trying to use reserved word 'return' as identifier
net/decnet/af_decnet.c:1639:16: sparse: sparse: Expected ; at end of declaration
net/decnet/af_decnet.c:1639:16: sparse: sparse: got 0
net/decnet/af_decnet.c:1640:1: sparse: sparse: Expected ; at the end of type declaration
net/decnet/af_decnet.c:1640:1: sparse: sparse: got }
net/decnet/af_decnet.c:1648:19: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1648:19: sparse: sparse: got &
net/decnet/af_decnet.c:1648:9: sparse: sparse: Trying to use reserved word 'if' as identifier
net/decnet/af_decnet.c:1651:9: sparse: sparse: Expected ) in function declarator
net/decnet/af_decnet.c:1651:9: sparse: sparse: got =
>> net/decnet/af_decnet.c:1651:9: sparse: sparse: Trying to use reserved word 'for' as identifier
net/decnet/af_decnet.c:1651:9: sparse: sparse: Expected ; at end of declaration
net/decnet/af_decnet.c:1651:9: sparse: sparse: got !=
net/decnet/af_decnet.c:1651:9: sparse: sparse: too many errors
--
>> net/dccp/proto.c:421:53: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected void const [noderef] __user *from @@ got union sockptr_t [usertype] optval @@
>> net/dccp/proto.c:421:53: sparse: expected void const [noderef] __user *from
>> net/dccp/proto.c:421:53: sparse: got union sockptr_t [usertype] optval
>> net/dccp/proto.c:527:52: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 const [usertype] service @@ got int [addressable] val @@
net/dccp/proto.c:527:52: sparse: expected restricted __be32 const [usertype] service
>> net/dccp/proto.c:527:52: sparse: got int [addressable] val
>> net/dccp/proto.c:571:71: sparse: sparse: incorrect type in argument 4 (invalid types) @@ expected union sockptr_t [usertype] optval @@ got char [noderef] __user *optval @@
>> net/dccp/proto.c:571:71: sparse: expected union sockptr_t [usertype] optval
>> net/dccp/proto.c:571:71: sparse: got char [noderef] __user *optval
net/dccp/proto.c:573:55: sparse: sparse: incorrect type in argument 4 (invalid types) @@ expected union sockptr_t [usertype] optval @@ got char [noderef] __user *optval @@
net/dccp/proto.c:573:55: sparse: expected union sockptr_t [usertype] optval
net/dccp/proto.c:573:55: sparse: got char [noderef] __user *optval
net/dccp/proto.c:566:5: sparse: sparse: symbol 'dccp_setsockopt' redeclared with different type (incompatible argument 4 (different base types)):
>> net/dccp/proto.c:566:5: sparse: int extern [addressable] [signed] [toplevel] dccp_setsockopt( ... )
net/dccp/dccp.h:297:5: sparse: note: previously declared as:
>> net/dccp/dccp.h:297:5: sparse: int extern [addressable] [signed] [toplevel] dccp_setsockopt( ... )
net/dccp/proto.c:710:57: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] param @@ got int cmsg_type @@
net/dccp/proto.c:710:57: sparse: expected restricted __be32 [usertype] param
net/dccp/proto.c:710:57: sparse: got int cmsg_type
vim +1659 net/mptcp/protocol.c
79c0949e9a09f6 Peter Krystad 2020-01-21 1628
fd1452d8ef988d Florian Westphal 2020-07-05 1629 static int mptcp_setsockopt_sol_socket(struct mptcp_sock *msk, int optname,
65b86d5658a5bb Christoph Hellwig 2020-07-16 1630 sockptr_t optval, unsigned int optlen)
fd1452d8ef988d Florian Westphal 2020-07-05 1631 {
fd1452d8ef988d Florian Westphal 2020-07-05 1632 struct sock *sk = (struct sock *)msk;
fd1452d8ef988d Florian Westphal 2020-07-05 1633 struct socket *ssock;
fd1452d8ef988d Florian Westphal 2020-07-05 1634 int ret;
fd1452d8ef988d Florian Westphal 2020-07-05 1635
fd1452d8ef988d Florian Westphal 2020-07-05 1636 switch (optname) {
fd1452d8ef988d Florian Westphal 2020-07-05 1637 case SO_REUSEPORT:
fd1452d8ef988d Florian Westphal 2020-07-05 1638 case SO_REUSEADDR:
fd1452d8ef988d Florian Westphal 2020-07-05 1639 lock_sock(sk);
fd1452d8ef988d Florian Westphal 2020-07-05 1640 ssock = __mptcp_nmpc_socket(msk);
fd1452d8ef988d Florian Westphal 2020-07-05 1641 if (!ssock) {
fd1452d8ef988d Florian Westphal 2020-07-05 1642 release_sock(sk);
fd1452d8ef988d Florian Westphal 2020-07-05 1643 return -EINVAL;
fd1452d8ef988d Florian Westphal 2020-07-05 1644 }
fd1452d8ef988d Florian Westphal 2020-07-05 1645
65b86d5658a5bb Christoph Hellwig 2020-07-16 1646 ret = sock_setsockopt(ssock, SOL_SOCKET, optname, optval,
65b86d5658a5bb Christoph Hellwig 2020-07-16 1647 optlen);
fd1452d8ef988d Florian Westphal 2020-07-05 1648 if (ret == 0) {
fd1452d8ef988d Florian Westphal 2020-07-05 1649 if (optname == SO_REUSEPORT)
fd1452d8ef988d Florian Westphal 2020-07-05 1650 sk->sk_reuseport = ssock->sk->sk_reuseport;
fd1452d8ef988d Florian Westphal 2020-07-05 1651 else if (optname == SO_REUSEADDR)
fd1452d8ef988d Florian Westphal 2020-07-05 1652 sk->sk_reuse = ssock->sk->sk_reuse;
fd1452d8ef988d Florian Westphal 2020-07-05 1653 }
fd1452d8ef988d Florian Westphal 2020-07-05 1654 release_sock(sk);
fd1452d8ef988d Florian Westphal 2020-07-05 1655 return ret;
fd1452d8ef988d Florian Westphal 2020-07-05 1656 }
fd1452d8ef988d Florian Westphal 2020-07-05 1657
1bc49241714c4e Christoph Hellwig 2020-07-16 1658 return sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname,
1bc49241714c4e Christoph Hellwig 2020-07-16 @1659 USER_SOCKPTR(optval), optlen);
fd1452d8ef988d Florian Westphal 2020-07-05 1660 }
fd1452d8ef988d Florian Westphal 2020-07-05 1661
:::::: The code at line 1659 was first introduced by commit
:::::: 1bc49241714c4e3ee30a9081f589f0cb4a9cede2 net: switch sock_set_timeout to sockptr_t
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Christoph Hellwig <hch(a)lst.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
ld.lld: error: section .bss virtual address range overlaps with .ARM.exidx
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Nathan Huckleberry <nhuck15(a)gmail.com>
CC: Russell King <rmk+kernel(a)armlinux.org.uk>
CC: Nick Desaulniers <ndesaulniers(a)google.com>
Hi Nathan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8456690ba8eb18ea4714e68554e242a04f65cff
commit: 6dc5fd93b2f1ef75d5e50fced8cb193811f25f22 ARM: 8900/1: UNWINDER_FRAME_POINTER implementation for Clang
date: 11 months ago
config: arm-randconfig-r026-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout 6dc5fd93b2f1ef75d5e50fced8cb193811f25f22
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
>> ld.lld: error: section .bss virtual address range overlaps with .ARM.exidx
>>> .bss range is [0x945000, 0x1176CB3]
>>> .ARM.exidx range is [0xDC9360, 0xDC936F]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-review:UPDATE-20200716-151949/Nikolay-Borisov/Convert-seed-devices-to-proper-list-API/20200715-185120 5/5] fs/btrfs/super.c:2404:30: error: no member named 'seed' in 'struct btrfs_fs_devices'
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200716-151949/Nikolay-B...
head: f112779455cf6687b517abe0ca5ec383eb05e4cc
commit: f112779455cf6687b517abe0ca5ec383eb05e4cc [5/5] btrfs: Switch seed device to list api
config: arm-randconfig-r023-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout f112779455cf6687b517abe0ca5ec383eb05e4cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 fs/btrfs/super.c:30:
In file included from fs/btrfs/delayed-inode.h:17:
fs/btrfs/ctree.h:2271:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
size_t __const btrfs_get_num_csums(void);
^~~~~~~~
In file included from fs/btrfs/super.c:46:
fs/btrfs/sysfs.h:16:14: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
^~~~~~
>> fs/btrfs/super.c:2404:30: error: no member named 'seed' in 'struct btrfs_fs_devices'
cur_devices = cur_devices->seed;
~~~~~~~~~~~ ^
2 warnings and 1 error generated.
vim +2404 fs/btrfs/super.c
9e7cc91a6d18a4 Wang Xiaoguang 2016-08-01 2377
9c5085c147989d Josef Bacik 2012-06-05 2378 static int btrfs_show_devname(struct seq_file *m, struct dentry *root)
9c5085c147989d Josef Bacik 2012-06-05 2379 {
9c5085c147989d Josef Bacik 2012-06-05 2380 struct btrfs_fs_info *fs_info = btrfs_sb(root->d_sb);
9c5085c147989d Josef Bacik 2012-06-05 2381 struct btrfs_fs_devices *cur_devices;
9c5085c147989d Josef Bacik 2012-06-05 2382 struct btrfs_device *dev, *first_dev = NULL;
9c5085c147989d Josef Bacik 2012-06-05 2383 struct list_head *head;
9c5085c147989d Josef Bacik 2012-06-05 2384
88c14590cdd6f3 David Sterba 2018-03-16 2385 /*
88c14590cdd6f3 David Sterba 2018-03-16 2386 * Lightweight locking of the devices. We should not need
88c14590cdd6f3 David Sterba 2018-03-16 2387 * device_list_mutex here as we only read the device data and the list
88c14590cdd6f3 David Sterba 2018-03-16 2388 * is protected by RCU. Even if a device is deleted during the list
88c14590cdd6f3 David Sterba 2018-03-16 2389 * traversals, we'll get valid data, the freeing callback will wait at
52042d8e82ff50 Andrea Gelmini 2018-11-28 2390 * least until the rcu_read_unlock.
88c14590cdd6f3 David Sterba 2018-03-16 2391 */
88c14590cdd6f3 David Sterba 2018-03-16 2392 rcu_read_lock();
9c5085c147989d Josef Bacik 2012-06-05 2393 cur_devices = fs_info->fs_devices;
9c5085c147989d Josef Bacik 2012-06-05 2394 while (cur_devices) {
9c5085c147989d Josef Bacik 2012-06-05 2395 head = &cur_devices->devices;
88c14590cdd6f3 David Sterba 2018-03-16 2396 list_for_each_entry_rcu(dev, head, dev_list) {
e6e674bd4d54fe Anand Jain 2017-12-04 2397 if (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state))
aa9ddcd4b55571 Josef Bacik 2012-08-02 2398 continue;
0aeb8a6e67cdde Anand Jain 2014-06-30 2399 if (!dev->name)
0aeb8a6e67cdde Anand Jain 2014-06-30 2400 continue;
9c5085c147989d Josef Bacik 2012-06-05 2401 if (!first_dev || dev->devid < first_dev->devid)
9c5085c147989d Josef Bacik 2012-06-05 2402 first_dev = dev;
9c5085c147989d Josef Bacik 2012-06-05 2403 }
9c5085c147989d Josef Bacik 2012-06-05 @2404 cur_devices = cur_devices->seed;
9c5085c147989d Josef Bacik 2012-06-05 2405 }
9c5085c147989d Josef Bacik 2012-06-05 2406
672d599041c862 Misono Tomohiro 2018-08-02 2407 if (first_dev)
672d599041c862 Misono Tomohiro 2018-08-02 2408 seq_escape(m, rcu_str_deref(first_dev->name), " \t\n\\");
672d599041c862 Misono Tomohiro 2018-08-02 2409 else
9c5085c147989d Josef Bacik 2012-06-05 2410 WARN_ON(1);
88c14590cdd6f3 David Sterba 2018-03-16 2411 rcu_read_unlock();
9c5085c147989d Josef Bacik 2012-06-05 2412 return 0;
9c5085c147989d Josef Bacik 2012-06-05 2413 }
9c5085c147989d Josef Bacik 2012-06-05 2414
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] ebpf: fix parameter naming confusing
by kernel test robot
Hi YangYuxi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net/master ipvs/master net-next/master v5.8-rc5 next-20200716]
[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/YangYuxi/ebpf-fix-parameter-nami...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: powerpc64-randconfig-r003-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
>> kernel/bpf/syscall.c:1887:7: error: use of undeclared identifier 'attach_type'
if (!attach_type)
^
1 error generated.
vim +/attach_type +1887 kernel/bpf/syscall.c
b16d9aa4c2b90a Martin KaFai Lau 2017-06-05 1882
040ee69226f8a9 Al Viro 2017-12-02 1883 bool bpf_prog_get_ok(struct bpf_prog *prog,
10eb063762081a YangYuxi 2020-07-16 1884 enum bpf_prog_type *prog_type, bool attach_drv)
248f346ffe9508 Jakub Kicinski 2017-11-03 1885 {
288b3de55aace8 Jakub Kicinski 2017-11-20 1886 /* not an attachment, just a refcount inc, always allow */
288b3de55aace8 Jakub Kicinski 2017-11-20 @1887 if (!attach_type)
288b3de55aace8 Jakub Kicinski 2017-11-20 1888 return true;
248f346ffe9508 Jakub Kicinski 2017-11-03 1889
10eb063762081a YangYuxi 2020-07-16 1890 if (prog->type != *prog_type)
248f346ffe9508 Jakub Kicinski 2017-11-03 1891 return false;
288b3de55aace8 Jakub Kicinski 2017-11-20 1892 if (bpf_prog_is_dev_bound(prog->aux) && !attach_drv)
248f346ffe9508 Jakub Kicinski 2017-11-03 1893 return false;
248f346ffe9508 Jakub Kicinski 2017-11-03 1894
248f346ffe9508 Jakub Kicinski 2017-11-03 1895 return true;
248f346ffe9508 Jakub Kicinski 2017-11-03 1896 }
248f346ffe9508 Jakub Kicinski 2017-11-03 1897
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[peterz-queue:mm/tlb 10/10] arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git mm/tlb
head: 55e3796107033e2da8c8093a5e6c098e68b9c42c
commit: 55e3796107033e2da8c8093a5e6c098e68b9c42c [10/10] m68k/tlb: Fix __p*_free_tlb()
config: m68k-randconfig-r006-20200716 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
git checkout 55e3796107033e2da8c8093a5e6c098e68b9c42c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from arch/m68k/kernel/sys_m68k.c:35:
arch/m68k/include/asm/mcf_pgalloc.h: In function '__pte_free_tlb':
>> arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page' [-Werror=implicit-function-declaration]
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/tlb.h:5,
from arch/m68k/kernel/sys_m68k.c:35:
include/asm-generic/tlb.h: At top level:
>> include/asm-generic/tlb.h:446:20: warning: conflicting types for 'tlb_remove_page'
446 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
| ^~~~~~~~~~~~~~~
>> include/asm-generic/tlb.h:446:20: error: static declaration of 'tlb_remove_page' follows non-static declaration
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from arch/m68k/kernel/sys_m68k.c:35:
arch/m68k/include/asm/mcf_pgalloc.h:43:2: note: previous implicit declaration of 'tlb_remove_page' was here
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:40:17: warning: no previous prototype for 'sys_mmap2' [-Wmissing-prototypes]
40 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
| ^~~~~~~~~
arch/m68k/kernel/sys_m68k.c:378:1: warning: no previous prototype for 'sys_cacheflush' [-Wmissing-prototypes]
378 | sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
| ^~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:461:1: warning: no previous prototype for 'sys_atomic_cmpxchg_32' [-Wmissing-prototypes]
461 | sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,
| ^~~~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:560:16: warning: no previous prototype for 'sys_getpagesize' [-Wmissing-prototypes]
560 | asmlinkage int sys_getpagesize(void)
| ^~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:565:26: warning: no previous prototype for 'sys_get_thread_area' [-Wmissing-prototypes]
565 | asmlinkage unsigned long sys_get_thread_area(void)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:570:16: warning: no previous prototype for 'sys_set_thread_area' [-Wmissing-prototypes]
570 | asmlinkage int sys_set_thread_area(unsigned long tp)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:576:16: warning: no previous prototype for 'sys_atomic_barrier' [-Wmissing-prototypes]
576 | asmlinkage int sys_atomic_barrier(void)
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/sched/numa_balancing.h:10,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/sched/numa_balancing.h:10,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:145:27: note: in definition of macro 'WARN_ON_ONCE'
145 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/core.c:13:
arch/m68k/include/asm/mcf_pgalloc.h: In function '__pte_free_tlb':
>> arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page' [-Werror=implicit-function-declaration]
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/core.c:13:
include/asm-generic/tlb.h: At top level:
>> include/asm-generic/tlb.h:446:20: warning: conflicting types for 'tlb_remove_page'
446 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
| ^~~~~~~~~~~~~~~
>> include/asm-generic/tlb.h:446:20: error: static declaration of 'tlb_remove_page' follows non-static declaration
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/core.c:13:
arch/m68k/include/asm/mcf_pgalloc.h:43:2: note: previous implicit declaration of 'tlb_remove_page' was here
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:145:27: note: in definition of macro 'WARN_ON_ONCE'
145 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/fair.c:23:
arch/m68k/include/asm/mcf_pgalloc.h: In function '__pte_free_tlb':
>> arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page' [-Werror=implicit-function-declaration]
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/fair.c:23:
include/asm-generic/tlb.h: At top level:
>> include/asm-generic/tlb.h:446:20: warning: conflicting types for 'tlb_remove_page'
446 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
| ^~~~~~~~~~~~~~~
>> include/asm-generic/tlb.h:446:20: error: static declaration of 'tlb_remove_page' follows non-static declaration
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/fair.c:23:
arch/m68k/include/asm/mcf_pgalloc.h:43:2: note: previous implicit declaration of 'tlb_remove_page' was here
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
kernel/sched/fair.c:5360:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
5360 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11091:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
11091 | void free_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11093:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
11093 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11098:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
11098 | void online_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11100:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
11100 | void unregister_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/rt.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/rt.c:6:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:145:27: note: in definition of macro 'WARN_ON_ONCE'
145 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/rt.c:6:
arch/m68k/include/asm/mcf_pgalloc.h: In function '__pte_free_tlb':
>> arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page' [-Werror=implicit-function-declaration]
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/rt.c:6:
include/asm-generic/tlb.h: At top level:
>> include/asm-generic/tlb.h:446:20: warning: conflicting types for 'tlb_remove_page'
446 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
| ^~~~~~~~~~~~~~~
>> include/asm-generic/tlb.h:446:20: error: static declaration of 'tlb_remove_page' follows non-static declaration
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from kernel/sched/sched.h:69,
from kernel/sched/rt.c:6:
arch/m68k/include/asm/mcf_pgalloc.h:43:2: note: previous implicit declaration of 'tlb_remove_page' was here
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
kernel/sched/rt.c:253:6: warning: no previous prototype for 'free_rt_sched_group' [-Wmissing-prototypes]
253 | void free_rt_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:255:5: warning: no previous prototype for 'alloc_rt_sched_group' [-Wmissing-prototypes]
255 | int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:668:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
668 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from mm/oom_kill.c:47:
arch/m68k/include/asm/mcf_pgalloc.h: In function '__pte_free_tlb':
>> arch/m68k/include/asm/mcf_pgalloc.h:43:2: error: implicit declaration of function 'tlb_remove_page' [-Werror=implicit-function-declaration]
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/tlb.h:5,
from mm/oom_kill.c:47:
include/asm-generic/tlb.h: At top level:
>> include/asm-generic/tlb.h:446:20: warning: conflicting types for 'tlb_remove_page'
446 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
| ^~~~~~~~~~~~~~~
>> include/asm-generic/tlb.h:446:20: error: static declaration of 'tlb_remove_page' follows non-static declaration
In file included from arch/m68k/include/asm/pgalloc.h:12,
from include/asm-generic/tlb.h:17,
from arch/m68k/include/asm/tlb.h:5,
from mm/oom_kill.c:47:
arch/m68k/include/asm/mcf_pgalloc.h:43:2: note: previous implicit declaration of 'tlb_remove_page' was here
43 | tlb_remove_page(tlb, page);
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:60,
from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from mm/oom_kill.c:21:
mm/internal.h: In function 'mem_map_next':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
mm/internal.h:455:8: note: in expansion of macro 'pfn_valid'
455 | if (!pfn_valid(pfn))
| ^~~~~~~~~
cc1: some warnings being treated as errors
..
vim +/tlb_remove_page +43 arch/m68k/include/asm/mcf_pgalloc.h
36
37 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable,
38 unsigned long address)
39 {
40 struct page *page = virt_to_page(pgtable);
41
42 pgtable_pte_page_dtor(page);
> 43 tlb_remove_page(tlb, page);
44 }
45
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[nf-next:master 2/3] net/netfilter/ipvs/ip_vs_conn.c:1394:6: sparse: sparse: context imbalance in 'ip_vs_expire_nodest_conn_flush' - wrong count at exit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head: 3354c27699652b271b78c85f275b818e6b9843e6
commit: 04231e52d3557475231abe8a8fa1be0330826ed6 [2/3] ipvs: queue delayed work to expire no destination connections if expire_nodest_conn=1
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: mips-randconfig-s032-20200715 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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.2-49-g707c5017-dirty
git checkout 04231e52d3557475231abe8a8fa1be0330826ed6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
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 >>)
>> net/netfilter/ipvs/ip_vs_conn.c:1394:6: sparse: sparse: context imbalance in 'ip_vs_expire_nodest_conn_flush' - wrong count at exit
# https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/...
git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
git remote update nf-next
git checkout 04231e52d3557475231abe8a8fa1be0330826ed6
vim +/ip_vs_expire_nodest_conn_flush +1394 net/netfilter/ipvs/ip_vs_conn.c
04231e52d355747 Andrew Sy Kim 2020-07-08 1392
04231e52d355747 Andrew Sy Kim 2020-07-08 1393 #ifdef CONFIG_SYSCTL
04231e52d355747 Andrew Sy Kim 2020-07-08 @1394 void ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
04231e52d355747 Andrew Sy Kim 2020-07-08 1395 {
04231e52d355747 Andrew Sy Kim 2020-07-08 1396 int idx;
04231e52d355747 Andrew Sy Kim 2020-07-08 1397 struct ip_vs_conn *cp, *cp_c;
04231e52d355747 Andrew Sy Kim 2020-07-08 1398 struct ip_vs_dest *dest;
04231e52d355747 Andrew Sy Kim 2020-07-08 1399
04231e52d355747 Andrew Sy Kim 2020-07-08 1400 rcu_read_lock();
04231e52d355747 Andrew Sy Kim 2020-07-08 1401 for (idx = 0; idx < ip_vs_conn_tab_size; idx++) {
04231e52d355747 Andrew Sy Kim 2020-07-08 1402 hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) {
04231e52d355747 Andrew Sy Kim 2020-07-08 1403 if (cp->ipvs != ipvs)
04231e52d355747 Andrew Sy Kim 2020-07-08 1404 continue;
04231e52d355747 Andrew Sy Kim 2020-07-08 1405
04231e52d355747 Andrew Sy Kim 2020-07-08 1406 dest = cp->dest;
04231e52d355747 Andrew Sy Kim 2020-07-08 1407 if (!dest || (dest->flags & IP_VS_DEST_F_AVAILABLE))
04231e52d355747 Andrew Sy Kim 2020-07-08 1408 continue;
04231e52d355747 Andrew Sy Kim 2020-07-08 1409
04231e52d355747 Andrew Sy Kim 2020-07-08 1410 if (atomic_read(&cp->n_control))
04231e52d355747 Andrew Sy Kim 2020-07-08 1411 continue;
04231e52d355747 Andrew Sy Kim 2020-07-08 1412
04231e52d355747 Andrew Sy Kim 2020-07-08 1413 cp_c = cp->control;
04231e52d355747 Andrew Sy Kim 2020-07-08 1414 IP_VS_DBG(4, "del connection\n");
04231e52d355747 Andrew Sy Kim 2020-07-08 1415 ip_vs_conn_del(cp);
04231e52d355747 Andrew Sy Kim 2020-07-08 1416 if (cp_c && !atomic_read(&cp_c->n_control)) {
04231e52d355747 Andrew Sy Kim 2020-07-08 1417 IP_VS_DBG(4, "del controlling connection\n");
04231e52d355747 Andrew Sy Kim 2020-07-08 1418 ip_vs_conn_del(cp_c);
04231e52d355747 Andrew Sy Kim 2020-07-08 1419 }
04231e52d355747 Andrew Sy Kim 2020-07-08 1420 }
04231e52d355747 Andrew Sy Kim 2020-07-08 1421 cond_resched_rcu();
04231e52d355747 Andrew Sy Kim 2020-07-08 1422
04231e52d355747 Andrew Sy Kim 2020-07-08 1423 /* netns clean up started, abort delayed work */
04231e52d355747 Andrew Sy Kim 2020-07-08 1424 if (!ipvs->enable)
04231e52d355747 Andrew Sy Kim 2020-07-08 1425 return;
04231e52d355747 Andrew Sy Kim 2020-07-08 1426 }
04231e52d355747 Andrew Sy Kim 2020-07-08 1427 rcu_read_unlock();
04231e52d355747 Andrew Sy Kim 2020-07-08 1428 }
04231e52d355747 Andrew Sy Kim 2020-07-08 1429 #endif
04231e52d355747 Andrew Sy Kim 2020-07-08 1430
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[peterz-queue:x86/fpu 4/4] drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:438:8: error: unknown type name '__fpu'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fpu
head: e476cca1496d0f7f15ff57cceee4c33dea18677d
commit: e476cca1496d0f7f15ff57cceee4c33dea18677d [4/4] amdgpu/dc: Annotate __fpu
config: powerpc64-randconfig-r003-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git checkout e476cca1496d0f7f15ff57cceee4c33dea18677d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:438:8: error: unknown type name '__fpu'
static __fpu void dcn_bw_calc_rq_dlg_ttu(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: error: implicit declaration of function 'cpu_has_feature' [-Werror,-Wimplicit-function-declaration]
DC_FP_START();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:62:6: note: expanded from macro 'DC_FP_START'
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: note: did you mean 'mmu_has_feature'?
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:62:6: note: expanded from macro 'DC_FP_START'
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
^
arch/powerpc/include/asm/mmu.h:197:29: note: 'mmu_has_feature' declared here
static __always_inline bool mmu_has_feature(unsigned long feature)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: error: implicit declaration of function 'enable_kernel_vsx' [-Werror,-Wimplicit-function-declaration]
DC_FP_START();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:64:3: note: expanded from macro 'DC_FP_START'
enable_kernel_vsx(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: note: did you mean 'enable_kernel_fp'?
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:64:3: note: expanded from macro 'DC_FP_START'
enable_kernel_vsx(); \
^
arch/powerpc/include/asm/switch_to.h:40:13: note: 'enable_kernel_fp' declared here
extern void enable_kernel_fp(void);
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: error: implicit declaration of function 'enable_kernel_altivec' [-Werror,-Wimplicit-function-declaration]
DC_FP_START();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:67:3: note: expanded from macro 'DC_FP_START'
enable_kernel_altivec(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:626:2: note: did you mean 'enable_kernel_fp'?
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:67:3: note: expanded from macro 'DC_FP_START'
enable_kernel_altivec(); \
^
arch/powerpc/include/asm/switch_to.h:40:13: note: 'enable_kernel_fp' declared here
extern void enable_kernel_fp(void);
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:662:2: error: implicit declaration of function 'cpu_has_feature' [-Werror,-Wimplicit-function-declaration]
DC_FP_END();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:74:6: note: expanded from macro 'DC_FP_END'
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:662:2: error: implicit declaration of function 'disable_kernel_vsx' [-Werror,-Wimplicit-function-declaration]
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:75:3: note: expanded from macro 'DC_FP_END'
disable_kernel_vsx(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:662:2: note: did you mean 'disable_kernel_fp'?
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:75:3: note: expanded from macro 'DC_FP_END'
disable_kernel_vsx(); \
^
arch/powerpc/include/asm/switch_to.h:44:20: note: 'disable_kernel_fp' declared here
static inline void disable_kernel_fp(void)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:662:2: error: implicit declaration of function 'disable_kernel_altivec' [-Werror,-Wimplicit-function-declaration]
DC_FP_END();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:78:3: note: expanded from macro 'DC_FP_END'
disable_kernel_altivec(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:662:2: note: did you mean 'disable_kernel_fp'?
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:78:3: note: expanded from macro 'DC_FP_END'
disable_kernel_altivec(); \
^
arch/powerpc/include/asm/switch_to.h:44:20: note: 'disable_kernel_fp' declared here
static inline void disable_kernel_fp(void)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:676:8: error: unknown type name '__fpu'
static __fpu void hack_force_pipe_split(struct dcn_bw_internal_vars *v,
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:725:14: warning: no previous prototype for function 'get_highest_allowed_voltage_level' [-Wmissing-prototypes]
unsigned int get_highest_allowed_voltage_level(uint32_t hw_internal_rev, uint32_t pci_revision_id)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:725:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int get_highest_allowed_voltage_level(uint32_t hw_internal_rev, uint32_t pci_revision_id)
^
static
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:774:2: error: implicit declaration of function 'cpu_has_feature' [-Werror,-Wimplicit-function-declaration]
DC_FP_START();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:62:6: note: expanded from macro 'DC_FP_START'
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:774:2: error: implicit declaration of function 'enable_kernel_vsx' [-Werror,-Wimplicit-function-declaration]
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:64:3: note: expanded from macro 'DC_FP_START'
enable_kernel_vsx(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:774:2: error: implicit declaration of function 'enable_kernel_altivec' [-Werror,-Wimplicit-function-declaration]
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:67:3: note: expanded from macro 'DC_FP_START'
enable_kernel_altivec(); \
^
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1307:2: error: implicit declaration of function 'cpu_has_feature' [-Werror,-Wimplicit-function-declaration]
DC_FP_END();
^
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:74:6: note: expanded from macro 'DC_FP_END'
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
vim +/__fpu +438 drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c
437
> 438 static __fpu void dcn_bw_calc_rq_dlg_ttu(
439 const struct dc *dc,
440 const struct dcn_bw_internal_vars *v,
441 struct pipe_ctx *pipe,
442 int in_idx)
443 {
444 struct display_mode_lib *dml = (struct display_mode_lib *)(&dc->dml);
445 struct _vcs_dpi_display_dlg_regs_st *dlg_regs = &pipe->dlg_regs;
446 struct _vcs_dpi_display_ttu_regs_st *ttu_regs = &pipe->ttu_regs;
447 struct _vcs_dpi_display_rq_regs_st *rq_regs = &pipe->rq_regs;
448 struct _vcs_dpi_display_rq_params_st rq_param = {0};
449 struct _vcs_dpi_display_dlg_sys_params_st dlg_sys_param = {0};
450 struct _vcs_dpi_display_e2e_pipe_params_st input = { { { 0 } } };
451 float total_active_bw = 0;
452 float total_prefetch_bw = 0;
453 int total_flip_bytes = 0;
454 int i;
455
456 memset(dlg_regs, 0, sizeof(*dlg_regs));
457 memset(ttu_regs, 0, sizeof(*ttu_regs));
458 memset(rq_regs, 0, sizeof(*rq_regs));
459
460 for (i = 0; i < number_of_planes; i++) {
461 total_active_bw += v->read_bandwidth[i];
462 total_prefetch_bw += v->prefetch_bandwidth[i];
463 total_flip_bytes += v->total_immediate_flip_bytes[i];
464 }
465 dlg_sys_param.total_flip_bw = v->return_bw - dcn_bw_max2(total_active_bw, total_prefetch_bw);
466 if (dlg_sys_param.total_flip_bw < 0.0)
467 dlg_sys_param.total_flip_bw = 0;
468
469 dlg_sys_param.t_mclk_wm_us = v->dram_clock_change_watermark;
470 dlg_sys_param.t_sr_wm_us = v->stutter_enter_plus_exit_watermark;
471 dlg_sys_param.t_urg_wm_us = v->urgent_watermark;
472 dlg_sys_param.t_extra_us = v->urgent_extra_latency;
473 dlg_sys_param.deepsleep_dcfclk_mhz = v->dcf_clk_deep_sleep;
474 dlg_sys_param.total_flip_bytes = total_flip_bytes;
475
476 pipe_ctx_to_e2e_pipe_params(pipe, &input.pipe);
477 input.clks_cfg.dcfclk_mhz = v->dcfclk;
478 input.clks_cfg.dispclk_mhz = v->dispclk;
479 input.clks_cfg.dppclk_mhz = v->dppclk;
480 input.clks_cfg.refclk_mhz = dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000.0;
481 input.clks_cfg.socclk_mhz = v->socclk;
482 input.clks_cfg.voltage = v->voltage_level;
483 // dc->dml.logger = pool->base.logger;
484 input.dout.output_format = (v->output_format[in_idx] == dcn_bw_420) ? dm_420 : dm_444;
485 input.dout.output_type = (v->output[in_idx] == dcn_bw_hdmi) ? dm_hdmi : dm_dp;
486 //input[in_idx].dout.output_standard;
487
488 /*todo: soc->sr_enter_plus_exit_time??*/
489 dlg_sys_param.t_srx_delay_us = dc->dcn_ip->dcfclk_cstate_latency / v->dcf_clk_deep_sleep;
490
491 dml1_rq_dlg_get_rq_params(dml, &rq_param, input.pipe.src);
492 dml1_extract_rq_regs(dml, rq_regs, rq_param);
493 dml1_rq_dlg_get_dlg_params(
494 dml,
495 dlg_regs,
496 ttu_regs,
497 rq_param.dlg,
498 dlg_sys_param,
499 input,
500 true,
501 true,
502 v->pte_enable == dcn_bw_yes,
503 pipe->plane_state->flip_immediate);
504 }
505
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:sockptr 46/46] net/phonet/pep.c:1039:12: error: invalid storage class for function 'pep_getsockopt'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git sockptr
head: 6e97573fbdf946abb3ec30cabcc9aba14284aa3e
commit: 6e97573fbdf946abb3ec30cabcc9aba14284aa3e [46/46] net: pass a sockptr_t into ->setsockopt
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
git checkout 6e97573fbdf946abb3ec30cabcc9aba14284aa3e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/m68k/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:10,
from include/net/sock.h:38,
from net/phonet/pep.c:16:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from net/phonet/pep.c:12:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from net/phonet/pep.c:13:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
net/phonet/pep.c: In function 'pep_setsockopt':
>> net/phonet/pep.c:1039:12: error: invalid storage class for function 'pep_getsockopt'
1039 | static int pep_getsockopt(struct sock *sk, int level, int optname,
| ^~~~~~~~~~~~~~
>> net/phonet/pep.c:1039:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1039 | static int pep_getsockopt(struct sock *sk, int level, int optname,
| ^~~~~~
>> net/phonet/pep.c:1081:12: error: invalid storage class for function 'pipe_skb_send'
1081 | static int pipe_skb_send(struct sock *sk, struct sk_buff *skb)
| ^~~~~~~~~~~~~
>> net/phonet/pep.c:1111:12: error: invalid storage class for function 'pep_sendmsg'
1111 | static int pep_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
| ^~~~~~~~~~~
>> net/phonet/pep.c:1237:12: error: invalid storage class for function 'pep_recvmsg'
1237 | static int pep_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
| ^~~~~~~~~~~
>> net/phonet/pep.c:1294:13: error: invalid storage class for function 'pep_sock_unhash'
1294 | static void pep_sock_unhash(struct sock *sk)
| ^~~~~~~~~~~~~~~
>> net/phonet/pep.c:1329:16: error: initializer element is not constant
1329 | .getsockopt = pep_getsockopt,
| ^~~~~~~~~~~~~~
net/phonet/pep.c:1329:16: note: (near initialization for 'pep_proto.getsockopt')
net/phonet/pep.c:1330:13: error: initializer element is not constant
1330 | .sendmsg = pep_sendmsg,
| ^~~~~~~~~~~
net/phonet/pep.c:1330:13: note: (near initialization for 'pep_proto.sendmsg')
net/phonet/pep.c:1331:13: error: initializer element is not constant
1331 | .recvmsg = pep_recvmsg,
| ^~~~~~~~~~~
net/phonet/pep.c:1331:13: note: (near initialization for 'pep_proto.recvmsg')
net/phonet/pep.c:1334:13: error: initializer element is not constant
1334 | .unhash = pep_sock_unhash,
| ^~~~~~~~~~~~~~~
net/phonet/pep.c:1334:13: note: (near initialization for 'pep_proto.unhash')
>> net/phonet/pep.c:1347:19: error: invalid storage class for function 'pep_register'
1347 | static int __init pep_register(void)
| ^~~~~~~~~~~~
>> net/phonet/pep.c:1352:20: error: invalid storage class for function 'pep_unregister'
1352 | static void __exit pep_unregister(void)
| ^~~~~~~~~~~~~~
In file included from include/linux/bpf.h:20,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:42,
from include/net/sock.h:46,
from net/phonet/pep.c:16:
>> include/linux/module.h:131:42: error: invalid storage class for function '__inittest'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
net/phonet/pep.c:1357:1: note: in expansion of macro 'module_init'
1357 | module_init(pep_register);
| ^~~~~~~~~~~
>> net/phonet/pep.c:1357:1: warning: 'alias' attribute ignored [-Wattributes]
In file included from include/linux/bpf.h:20,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:42,
from include/net/sock.h:46,
from net/phonet/pep.c:16:
>> include/linux/module.h:137:42: error: invalid storage class for function '__exittest'
137 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
net/phonet/pep.c:1358:1: note: in expansion of macro 'module_exit'
1358 | module_exit(pep_unregister);
| ^~~~~~~~~~~
>> include/linux/module.h:137:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
137 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~
net/phonet/pep.c:1358:1: note: in expansion of macro 'module_exit'
1358 | module_exit(pep_unregister);
| ^~~~~~~~~~~
net/phonet/pep.c:1358:1: warning: 'alias' attribute ignored [-Wattributes]
In file included from include/linux/module.h:21,
from include/linux/bpf.h:20,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:42,
from include/net/sock.h:46,
from net/phonet/pep.c:16:
>> include/linux/moduleparam.h:24:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
24 | static const char __UNIQUE_ID(name)[] \
| ^~~~~~
include/linux/module.h:162:32: note: in expansion of macro '__MODULE_INFO'
162 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
| ^~~~~~~~~~~~~
include/linux/module.h:232:32: note: in expansion of macro 'MODULE_INFO'
232 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
| ^~~~~~~~~~~
net/phonet/pep.c:1359:1: note: in expansion of macro 'MODULE_AUTHOR'
1359 | MODULE_AUTHOR("Remi Denis-Courmont, Nokia");
| ^~~~~~~~~~~~~
>> net/phonet/pep.c:1362:1: error: expected declaration or statement at end of input
1362 | MODULE_ALIAS_NET_PF_PROTO(PF_PHONET, PN_PROTO_PIPE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
net/phonet/pep.c:1228:17: warning: 'pep_read' defined but not used [-Wunused-function]
1228 | struct sk_buff *pep_read(struct sock *sk)
| ^~~~~~~~
net/phonet/pep.c:1197:5: warning: 'pep_write' defined but not used [-Wunused-function]
1197 | int pep_write(struct sock *sk, struct sk_buff *skb)
| ^~~~~~~~~
net/phonet/pep.c:1190:5: warning: 'pep_writeable' defined but not used [-Wunused-function]
1190 | int pep_writeable(struct sock *sk)
| ^~~~~~~~~~~~~
net/phonet/pep.c:977:12: warning: 'pep_setsockopt' defined but not used [-Wunused-function]
977 | static int pep_setsockopt(struct sock *sk, int level, int optname,
| ^~~~~~~~~~~~~~
--
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/mISDNif.h:413,
from drivers/isdn/mISDN/socket.c:9:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/uio.h:8,
from include/linux/socket.h:8,
from include/linux/mISDNif.h:24,
from drivers/isdn/mISDN/socket.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/linux/uio.h:9,
from include/linux/socket.h:8,
from include/linux/mISDNif.h:24,
from drivers/isdn/mISDN/socket.c:9:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/uio.h:8,
from include/linux/socket.h:8,
from include/linux/mISDNif.h:24,
from drivers/isdn/mISDN/socket.c:9:
drivers/isdn/mISDN/socket.c: In function 'data_sock_setsockopt':
>> include/linux/kern_levels.h:5:18: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'sockptr_t' {aka 'struct <anonymous>'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
| ^~~~~~~~
drivers/isdn/mISDN/socket.c:410:10: note: in expansion of macro 'KERN_DEBUG'
410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock,
| ^~~~~~~~~~
drivers/isdn/mISDN/socket.c:410:38: note: format string is defined here
410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock,
| ~^
| |
| void *
--
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from net/mptcp/protocol.c:11:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from net/mptcp/protocol.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from net/mptcp/protocol.c:10:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
net/mptcp/protocol.c: In function 'mptcp_setsockopt_sol_socket':
>> net/mptcp/protocol.c:1659:24: error: incompatible type for argument 1 of 'USER_SOCKPTR'
1659 | USER_SOCKPTR(optval), optlen);
| ^~~~~~
| |
| sockptr_t {aka struct <anonymous>}
In file included from include/linux/net.h:24,
from include/linux/skbuff.h:26,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from net/mptcp/protocol.c:11:
include/linux/sockptr.h:43:51: note: expected 'void *' but argument is of type 'sockptr_t' {aka 'struct <anonymous>'}
43 | static inline sockptr_t USER_SOCKPTR(void __user *p)
| ~~~~~~~~~~~~~^
>> net/mptcp/protocol.c:1660:1: warning: control reaches end of non-void function [-Wreturn-type]
1660 | }
| ^
..
vim +/pep_getsockopt +1039 net/phonet/pep.c
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1038
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 @1039 static int pep_getsockopt(struct sock *sk, int level, int optname,
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1040 char __user *optval, int __user *optlen)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1041 {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1042 struct pep_sock *pn = pep_sk(sk);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1043 int len, val;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1044
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1045 if (level != SOL_PNPIPE)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1046 return -ENOPROTOOPT;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1047 if (get_user(len, optlen))
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1048 return -EFAULT;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1049
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1050 switch (optname) {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1051 case PNPIPE_ENCAP:
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1052 val = pn->ifindex ? PNPIPE_ENCAP_IP : PNPIPE_ENCAP_NONE;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1053 break;
8d98efa84b790b Kumar Sanghvi 2010-09-26 1054
03789f26722a15 Rémi Denis-Courmont 2010-10-08 1055 case PNPIPE_IFINDEX:
03789f26722a15 Rémi Denis-Courmont 2010-10-08 1056 val = pn->ifindex;
03789f26722a15 Rémi Denis-Courmont 2010-10-08 1057 break;
03789f26722a15 Rémi Denis-Courmont 2010-10-08 1058
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1059 case PNPIPE_HANDLE:
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1060 val = pn->pipe_handle;
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1061 if (val == PN_PIPE_INVALID_HANDLE)
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1062 return -EINVAL;
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1063 break;
acaf7df610ff3f Rémi Denis-Courmont 2011-03-08 1064
bdb6e697b2a76c Dinesh Kumar Sharma 2011-11-18 1065 case PNPIPE_INITSTATE:
bdb6e697b2a76c Dinesh Kumar Sharma 2011-11-18 1066 val = pn->init_enable;
bdb6e697b2a76c Dinesh Kumar Sharma 2011-11-18 1067 break;
bdb6e697b2a76c Dinesh Kumar Sharma 2011-11-18 1068
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1069 default:
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1070 return -ENOPROTOOPT;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1071 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1072
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1073 len = min_t(unsigned int, sizeof(int), len);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1074 if (put_user(len, optlen))
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1075 return -EFAULT;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1076 if (put_user(val, (int __user *) optval))
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1077 return -EFAULT;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1078 return 0;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1079 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1080
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 @1081 static int pipe_skb_send(struct sock *sk, struct sk_buff *skb)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1082 {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1083 struct pep_sock *pn = pep_sk(sk);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1084 struct pnpipehdr *ph;
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1085 int err;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1086
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1087 if (pn_flow_safe(pn->tx_fc) &&
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1088 !atomic_add_unless(&pn->tx_credits, -1, 0)) {
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1089 kfree_skb(skb);
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1090 return -ENOBUFS;
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1091 }
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1092
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1093 skb_push(skb, 3 + pn->aligned);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1094 skb_reset_transport_header(skb);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1095 ph = pnp_hdr(skb);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1096 ph->utid = 0;
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1097 if (pn->aligned) {
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1098 ph->message_id = PNS_PIPE_ALIGNED_DATA;
6321aa197547da Arnd Bergmann 2019-02-19 1099 ph->data0 = 0; /* padding */
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1100 } else
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1101 ph->message_id = PNS_PIPE_DATA;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1102 ph->pipe_handle = pn->pipe_handle;
14ba8faebcc241 Rémi Denis-Courmont 2011-02-24 1103 err = pn_skb_send(sk, skb, NULL);
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1104
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1105 if (err && pn_flow_safe(pn->tx_fc))
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1106 atomic_inc(&pn->tx_credits);
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1107 return err;
e1a5964f0c32a7 Rémi Denis-Courmont 2010-09-29 1108
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1109 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1110
1b784140474e4f Ying Xue 2015-03-02 @1111 static int pep_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1112 {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1113 struct pep_sock *pn = pep_sk(sk);
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1114 struct sk_buff *skb;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1115 long timeo;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1116 int flags = msg->msg_flags;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1117 int err, done;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1118
bcf1b70ac6eb0e Sasha Levin 2012-04-05 1119 if (len > USHRT_MAX)
bcf1b70ac6eb0e Sasha Levin 2012-04-05 1120 return -EMSGSIZE;
bcf1b70ac6eb0e Sasha Levin 2012-04-05 1121
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1122 if ((msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1123 MSG_CMSG_COMPAT)) ||
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1124 !(msg->msg_flags & MSG_EOR))
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1125 return -EOPNOTSUPP;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1126
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1127 skb = sock_alloc_send_skb(sk, MAX_PNPIPE_HEADER + len,
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1128 flags & MSG_DONTWAIT, &err);
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1129 if (!skb)
02ac3268a58163 Rémi Denis-Courmont 2010-08-30 1130 return err;
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1131
638be344593b66 Rémi Denis-Courmont 2011-03-15 1132 skb_reserve(skb, MAX_PHONET_HEADER + 3 + pn->aligned);
6ce8e9ce5989ae Al Viro 2014-04-06 1133 err = memcpy_from_msg(skb_put(skb, len), msg, len);
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1134 if (err < 0)
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1135 goto outfree;
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1136
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1137 lock_sock(sk);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1138 timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1139 if ((1 << sk->sk_state) & (TCPF_LISTEN|TCPF_CLOSE)) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1140 err = -ENOTCONN;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1141 goto out;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1142 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1143 if (sk->sk_state != TCP_ESTABLISHED) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1144 /* Wait until the pipe gets to enabled state */
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1145 disabled:
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1146 err = sk_stream_wait_connect(sk, &timeo);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1147 if (err)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1148 goto out;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1149
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1150 if (sk->sk_state == TCP_CLOSE_WAIT) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1151 err = -ECONNRESET;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1152 goto out;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1153 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1154 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1155 BUG_ON(sk->sk_state != TCP_ESTABLISHED);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1156
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1157 /* Wait until flow control allows TX */
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1158 done = atomic_read(&pn->tx_credits);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1159 while (!done) {
d9dc8b0f8b4ec8 WANG Cong 2016-11-11 1160 DEFINE_WAIT_FUNC(wait, woken_wake_function);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1161
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1162 if (!timeo) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1163 err = -EAGAIN;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1164 goto out;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1165 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1166 if (signal_pending(current)) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1167 err = sock_intr_errno(timeo);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1168 goto out;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1169 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1170
d9dc8b0f8b4ec8 WANG Cong 2016-11-11 1171 add_wait_queue(sk_sleep(sk), &wait);
d9dc8b0f8b4ec8 WANG Cong 2016-11-11 1172 done = sk_wait_event(sk, &timeo, atomic_read(&pn->tx_credits), &wait);
d9dc8b0f8b4ec8 WANG Cong 2016-11-11 1173 remove_wait_queue(sk_sleep(sk), &wait);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1174
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1175 if (sk->sk_state != TCP_ESTABLISHED)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1176 goto disabled;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1177 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1178
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1179 err = pipe_skb_send(sk, skb);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1180 if (err >= 0)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1181 err = len; /* success! */
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1182 skb = NULL;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1183 out:
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1184 release_sock(sk);
b1704374fd525e Rémi Denis-Courmont 2009-11-09 1185 outfree:
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1186 kfree_skb(skb);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1187 return err;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1188 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1189
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1190 int pep_writeable(struct sock *sk)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1191 {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1192 struct pep_sock *pn = pep_sk(sk);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1193
be677730a0ccb6 Rémi Denis-Courmont 2008-12-17 1194 return atomic_read(&pn->tx_credits);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1195 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1196
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1197 int pep_write(struct sock *sk, struct sk_buff *skb)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1198 {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1199 struct sk_buff *rskb, *fs;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1200 int flen = 0;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1201
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1202 if (pep_sk(sk)->aligned)
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1203 return pipe_skb_send(sk, skb);
fea93ecef619b5 Rémi Denis-Courmont 2010-01-04 1204
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1205 rskb = alloc_skb(MAX_PNPIPE_HEADER, GFP_ATOMIC);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1206 if (!rskb) {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1207 kfree_skb(skb);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1208 return -ENOMEM;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1209 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1210 skb_shinfo(rskb)->frag_list = skb;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1211 rskb->len += skb->len;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1212 rskb->data_len += rskb->len;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1213 rskb->truesize += rskb->len;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1214
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1215 /* Avoid nested fragments */
5c313e9a7773ec David S. Miller 2009-06-09 1216 skb_walk_frags(skb, fs)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1217 flen += fs->len;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1218 skb->next = skb_shinfo(skb)->frag_list;
5c313e9a7773ec David S. Miller 2009-06-09 1219 skb_frag_list_init(skb);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1220 skb->len -= flen;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1221 skb->data_len -= flen;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1222 skb->truesize -= flen;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1223
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1224 skb_reserve(rskb, MAX_PHONET_HEADER + 3);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1225 return pipe_skb_send(sk, rskb);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1226 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1227
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1228 struct sk_buff *pep_read(struct sock *sk)
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1229 {
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1230 struct sk_buff *skb = skb_dequeue(&sk->sk_receive_queue);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1231
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1232 if (sk->sk_state == TCP_ESTABLISHED)
44c9ab16d29a50 Rémi Denis-Courmont 2011-03-08 1233 pipe_grant_credits(sk, GFP_ATOMIC);
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1234 return skb;
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1235 }
02a47617cdce44 Rémi Denis-Courmont 2008-10-05 1236
1b784140474e4f Ying Xue 2015-03-02 @1237 static int pep_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
1b784140474e4f Ying Xue 2015-03-02 1238 int noblock, int flags, int *addr_len)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1239 {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1240 struct sk_buff *skb;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1241 int err;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1242
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1243 if (flags & ~(MSG_OOB|MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1244 MSG_NOSIGNAL|MSG_CMSG_COMPAT))
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1245 return -EOPNOTSUPP;
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1246
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1247 if (unlikely(1 << sk->sk_state & (TCPF_LISTEN | TCPF_CLOSE)))
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1248 return -ENOTCONN;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1249
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1250 if ((flags & MSG_OOB) || sock_flag(sk, SOCK_URGINLINE)) {
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1251 /* Dequeue and acknowledge control request */
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1252 struct pep_sock *pn = pep_sk(sk);
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1253
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1254 if (flags & MSG_PEEK)
82ecbcb9c6b525 Rémi Denis-Courmont 2010-01-04 1255 return -EOPNOTSUPP;
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1256 skb = skb_dequeue(&pn->ctrlreq_queue);
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1257 if (skb) {
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1258 pep_ctrlreq_error(sk, skb, PN_PIPE_NO_ERROR,
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1259 GFP_KERNEL);
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1260 msg->msg_flags |= MSG_OOB;
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1261 goto copy;
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1262 }
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1263 if (flags & MSG_OOB)
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1264 return -EINVAL;
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1265 }
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1266
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1267 skb = skb_recv_datagram(sk, flags, noblock, &err);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1268 lock_sock(sk);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1269 if (skb == NULL) {
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1270 if (err == -ENOTCONN && sk->sk_state == TCP_CLOSE_WAIT)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1271 err = -ECONNRESET;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1272 release_sock(sk);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1273 return err;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1274 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1275
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1276 if (sk->sk_state == TCP_ESTABLISHED)
44c9ab16d29a50 Rémi Denis-Courmont 2011-03-08 1277 pipe_grant_credits(sk, GFP_KERNEL);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1278 release_sock(sk);
c41bd97f815720 Rémi Denis-Courmont 2008-10-05 1279 copy:
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1280 msg->msg_flags |= MSG_EOR;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1281 if (skb->len > len)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1282 msg->msg_flags |= MSG_TRUNC;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1283 else
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1284 len = skb->len;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1285
51f3d02b980a33 David S. Miller 2014-11-05 1286 err = skb_copy_datagram_msg(skb, 0, msg, len);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1287 if (!err)
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1288 err = (flags & MSG_TRUNC) ? skb->len : len;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1289
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1290 skb_free_datagram(sk, skb);
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1291 return err;
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1292 }
9641458d3ec42d Rémi Denis-Courmont 2008-10-05 1293
:::::: The code at line 1039 was first introduced by commit
:::::: 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a Phonet: implement GPRS virtual interface over PEP socket
:::::: TO: Rémi Denis-Courmont <remi.denis-courmont(a)nokia.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] ebpf: fix parameter naming confusing
by kernel test robot
Hi YangYuxi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net/master ipvs/master net-next/master v5.8-rc5 next-20200716]
[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/YangYuxi/ebpf-fix-parameter-nami...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
kernel/bpf/syscall.c: In function 'bpf_prog_get_ok':
>> kernel/bpf/syscall.c:1887:7: error: 'attach_type' undeclared (first use in this function); did you mean 'stack_type'?
1887 | if (!attach_type)
| ^~~~~~~~~~~
| stack_type
kernel/bpf/syscall.c:1887:7: note: each undeclared identifier is reported only once for each function it appears in
vim +1887 kernel/bpf/syscall.c
b16d9aa4c2b90a Martin KaFai Lau 2017-06-05 1882
040ee69226f8a9 Al Viro 2017-12-02 1883 bool bpf_prog_get_ok(struct bpf_prog *prog,
10eb063762081a YangYuxi 2020-07-16 1884 enum bpf_prog_type *prog_type, bool attach_drv)
248f346ffe9508 Jakub Kicinski 2017-11-03 1885 {
288b3de55aace8 Jakub Kicinski 2017-11-20 1886 /* not an attachment, just a refcount inc, always allow */
288b3de55aace8 Jakub Kicinski 2017-11-20 @1887 if (!attach_type)
288b3de55aace8 Jakub Kicinski 2017-11-20 1888 return true;
248f346ffe9508 Jakub Kicinski 2017-11-03 1889
10eb063762081a YangYuxi 2020-07-16 1890 if (prog->type != *prog_type)
248f346ffe9508 Jakub Kicinski 2017-11-03 1891 return false;
288b3de55aace8 Jakub Kicinski 2017-11-20 1892 if (bpf_prog_is_dev_bound(prog->aux) && !attach_drv)
248f346ffe9508 Jakub Kicinski 2017-11-03 1893 return false;
248f346ffe9508 Jakub Kicinski 2017-11-03 1894
248f346ffe9508 Jakub Kicinski 2017-11-03 1895 return true;
248f346ffe9508 Jakub Kicinski 2017-11-03 1896 }
248f346ffe9508 Jakub Kicinski 2017-11-03 1897
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months