[PATCH v2] s390: fix build error for sys_call_table_emu
by Xiaoming Ni
Build error on s390:
arch/s390/kernel/entry.o: in function `sys_call_table_emu':
>> (.rodata+0x1288): undefined reference to `__s390_'
In commit ("All arch: remove system call sys_sysctl")
148 common fdatasync sys_fdatasync sys_fdatasync
-149 common _sysctl sys_sysctl compat_sys_sysctl
+149 common _sysctl sys_ni_syscall
150 common mlock sys_mlock sys_mlock
After the patch is integrated, there is a format error in the generated
arch/s390/include/generated/asm/syscall_table.h:
SYSCALL(sys_fdatasync, sys_fdatasync)
SYSCALL(sys_ni_syscall,) /* cause build error */
SYSCALL(sys_mlock,sys_mlock)
According to the guidance of Heiko Carstens, use "-" to fill the empty system call
Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
Fixes: ("All arch: remove system call sys_sysctl")
Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@hu...
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Xiaoming Ni <nixiaoming(a)huawei.com>
changes in v2:
use "-" to fill the empty system call
v1: https://lore.kernel.org/lkml/20200618110320.104013-1-nixiaoming@huawei.com/
---
arch/s390/kernel/syscalls/syscall.tbl | 2 +-
tools/perf/arch/s390/entry/syscalls/syscall.tbl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index f17aaf6fe5de..04c34c2ed916 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -138,7 +138,7 @@
146 common writev sys_writev compat_sys_writev
147 common getsid sys_getsid sys_getsid
148 common fdatasync sys_fdatasync sys_fdatasync
-149 common _sysctl sys_ni_syscall
+149 common _sysctl - -
150 common mlock sys_mlock sys_mlock
151 common munlock sys_munlock sys_munlock
152 common mlockall sys_mlockall sys_mlockall
diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
index 0193f9b98753..29144b79a49d 100644
--- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
@@ -138,7 +138,7 @@
146 common writev sys_writev compat_sys_writev
147 common getsid sys_getsid sys_getsid
148 common fdatasync sys_fdatasync sys_fdatasync
-149 common _sysctl sys_ni_syscall
+149 common _sysctl - -
150 common mlock sys_mlock compat_sys_mlock
151 common munlock sys_munlock compat_sys_munlock
152 common mlockall sys_mlockall sys_mlockall
--
2.27.0
2 years, 3 months
Re: [PATCH v3 2/2] display/drm/bridge: TC358775 DSI/LVDS driver
by kernel test robot
Hi Vinay,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vinay-Simha-BN/dt-binding-Add-DS...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1b5044021070efa3259f3e9548dc35d1eb6aa844
config: nds32-randconfig-r002-20200619 (attached as .config)
compiler: nds32le-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/gpu/drm/bridge/tc358775.c:505:5: warning: no previous prototype for 'tc358775_parse_dt' [-Wmissing-prototypes]
505 | int tc358775_parse_dt(struct device_node *np, struct tc_data *tc)
| ^~~~~~~~~~~~~~~~~
vim +/tc358775_parse_dt +505 drivers/gpu/drm/bridge/tc358775.c
504
> 505 int tc358775_parse_dt(struct device_node *np, struct tc_data *tc)
506 {
507 struct device_node *endpoint;
508 struct device_node *parent;
509 struct device_node *remote;
510 struct property *prop;
511 int len;
512
513 endpoint = of_graph_get_endpoint_by_regs(tc->dev->of_node,
514 TC358775_DSI_IN, -1);
515 if (endpoint) {
516 /* dsi0_out node */
517 parent = of_graph_get_remote_port_parent(endpoint);
518 of_node_put(endpoint);
519 if (parent) {
520 /* dsi0 port 1 */
521 endpoint = of_graph_get_endpoint_by_regs(parent, 1, -1);
522 of_node_put(parent);
523 if (endpoint) {
524 prop = of_find_property(endpoint, "data-lanes",
525 &len);
526 of_node_put(endpoint);
527 if (!prop) {
528 dev_err(tc->dev,
529 "failed to find data lane\n");
530 return -EPROBE_DEFER;
531 }
532 }
533 }
534 }
535
536 tc->num_dsi_lanes = len / sizeof(u32);
537
538 if (tc->num_dsi_lanes < 1 || tc->num_dsi_lanes > 4)
539 return -EINVAL;
540
541 tc->host_node = of_graph_get_remote_node(np, 0, 0);
542 if (!tc->host_node)
543 return -ENODEV;
544
545 of_node_put(tc->host_node);
546
547 endpoint = of_graph_get_endpoint_by_regs(tc->dev->of_node,
548 TC358775_LVDS_OUT1, -1);
549 if (endpoint) {
550 remote = of_graph_get_remote_port_parent(endpoint);
551 of_node_put(endpoint);
552
553 if (remote) {
554 if (of_device_is_available(remote))
555 tc->dual_link = true;
556 of_node_put(remote);
557 }
558 }
559
560 dev_dbg(tc->dev, "no.of dsi lanes: %d\n", tc->num_dsi_lanes);
561 dev_dbg(tc->dev, "operating in %s-link mode\n",
562 tc->dual_link ? "dual" : "single");
563
564 return 0;
565 }
566
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [RFC PATCH v3 1/1] mmap_lock: add tracepoints around mmap_lock acquisition
by kernel test robot
Hi Axel,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/locking/core]
[also build test ERROR on tip/perf/core linux/master linus/master v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Axel-Rasmussen/Add-rwsem-contend...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git c935cd62d3fe985d7f0ebea185d2759e8992e96f
config: s390-randconfig-r005-20200619 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from kernel/trace/trace_events_hist.c:22:
In file included from kernel/trace/trace_synth.h:5:
In file included from kernel/trace/trace_dynevent.h:14:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from kernel/trace/trace_events_hist.c:22:
In file included from kernel/trace/trace_synth.h:5:
In file included from kernel/trace/trace_dynevent.h:14:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from kernel/trace/trace_events_hist.c:22:
In file included from kernel/trace/trace_synth.h:5:
In file included from kernel/trace/trace_dynevent.h:14:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from kernel/trace/trace_events_hist.c:22:
In file included from kernel/trace/trace_synth.h:5:
In file included from kernel/trace/trace_dynevent.h:14:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from kernel/trace/trace_events_hist.c:22:
In file included from kernel/trace/trace_synth.h:5:
In file included from kernel/trace/trace_dynevent.h:14:
>> kernel/trace/trace.h:682:30: error: no member named 'trace_recursion' in 'struct task_struct'
unsigned int val = current->trace_recursion;
~~~~~~~ ^
kernel/trace/trace.h:694:11: error: no member named 'trace_recursion' in 'struct task_struct'
current->trace_recursion = val;
~~~~~~~ ^
kernel/trace/trace.h:702:30: error: no member named 'trace_recursion' in 'struct task_struct'
unsigned int val = current->trace_recursion;
~~~~~~~ ^
kernel/trace/trace.h:711:11: error: no member named 'trace_recursion' in 'struct task_struct'
current->trace_recursion = val;
~~~~~~~ ^
>> kernel/trace/trace_events_hist.c:834:3: error: implicit declaration of function 'trace_array_put' [-Werror,-Wimplicit-function-declaration]
trace_array_put(tr);
^
kernel/trace/trace_events_hist.c:834:3: note: did you mean 'trace_array_get'?
kernel/trace/trace.h:384:12: note: 'trace_array_get' declared here
extern int trace_array_get(struct trace_array *tr);
^
kernel/trace/trace_events_hist.c:860:2: error: implicit declaration of function 'trace_array_put' [-Werror,-Wimplicit-function-declaration]
trace_array_put(tr);
^
20 warnings and 6 errors generated.
vim +682 kernel/trace/trace.h
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 679
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 680 static __always_inline int trace_test_and_set_recursion(int start, int max)
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 681 {
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 @682 unsigned int val = current->trace_recursion;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 683 int bit;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 684
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 685 /* A previous recursion check was made */
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 686 if ((val & TRACE_CONTEXT_MASK) > max)
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 687 return 0;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 688
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 689 bit = trace_get_context_bit() + start;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 690 if (unlikely(val & (1 << bit)))
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 691 return -1;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 692
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 693 val |= 1 << bit;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 694 current->trace_recursion = val;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 695 barrier();
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 696
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 697 return bit;
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 698 }
edc15cafcbfa3d7 Steven Rostedt 2012-11-02 699
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] [net/sched] Fix null pointer deref skb in tc_ctl_action
by kernel test robot
Hi Gaurav,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gaurav-Singh/Fix-null-pointer-de...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1b5044021070efa3259f3e9548dc35d1eb6aa844
config: mips-randconfig-r004-20200619 (attached as .config)
compiler: mipsel-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
net/sched/act_api.c: In function 'tc_ctl_action':
>> net/sched/act_api.c:1479:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1479 | struct net *net = sock_net(skb->sk);
| ^~~~~~
vim +1479 net/sched/act_api.c
90825b23a887f0 Jamal Hadi Salim 2017-07-30 1472
c21ef3e343ae91 David Ahern 2017-04-16 1473 static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n,
c21ef3e343ae91 David Ahern 2017-04-16 1474 struct netlink_ext_ack *extack)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1475 {
63de5fbd31b331 Gaurav Singh 2020-06-17 1476 if (!skb)
63de5fbd31b331 Gaurav Singh 2020-06-17 1477 return 0;
63de5fbd31b331 Gaurav Singh 2020-06-17 1478
3b1e0a655f8eba YOSHIFUJI Hideaki 2008-03-26 @1479 struct net *net = sock_net(skb->sk);
90825b23a887f0 Jamal Hadi Salim 2017-07-30 1480 struct nlattr *tca[TCA_ROOT_MAX + 1];
63de5fbd31b331 Gaurav Singh 2020-06-17 1481 u32 portid = NETLINK_CB(skb).portid;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1482 int ret = 0, ovr = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1483
0b0f43fe2e7291 Jamal Hadi Salim 2016-06-05 1484 if ((n->nlmsg_type != RTM_GETACTION) &&
0b0f43fe2e7291 Jamal Hadi Salim 2016-06-05 1485 !netlink_capable(skb, CAP_NET_ADMIN))
dfc47ef8639fac Eric W. Biederman 2012-11-16 1486 return -EPERM;
dfc47ef8639fac Eric W. Biederman 2012-11-16 1487
8cb081746c031f Johannes Berg 2019-04-26 1488 ret = nlmsg_parse_deprecated(n, sizeof(struct tcamsg), tca,
8cb081746c031f Johannes Berg 2019-04-26 1489 TCA_ROOT_MAX, NULL, extack);
7ba699c604ab81 Patrick McHardy 2008-01-22 1490 if (ret < 0)
7ba699c604ab81 Patrick McHardy 2008-01-22 1491 return ret;
7ba699c604ab81 Patrick McHardy 2008-01-22 1492
7ba699c604ab81 Patrick McHardy 2008-01-22 1493 if (tca[TCA_ACT_TAB] == NULL) {
84ae017a007764 Alexander Aring 2018-02-15 1494 NL_SET_ERR_MSG(extack, "Netlink action attributes missing");
^1da177e4c3f41 Linus Torvalds 2005-04-16 1495 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1496 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1497
cc7ec456f82da7 Eric Dumazet 2011-01-19 1498 /* n->nlmsg_flags & NLM_F_CREATE */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1499 switch (n->nlmsg_type) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1500 case RTM_NEWACTION:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1501 /* we are going to assume all other flags
25985edcedea63 Lucas De Marchi 2011-03-30 1502 * imply create only if it doesn't exist
^1da177e4c3f41 Linus Torvalds 2005-04-16 1503 * Note that CREATE | EXCL implies that
^1da177e4c3f41 Linus Torvalds 2005-04-16 1504 * but since we want avoid ambiguity (eg when flags
^1da177e4c3f41 Linus Torvalds 2005-04-16 1505 * is zero) then just set this
^1da177e4c3f41 Linus Torvalds 2005-04-16 1506 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1507 if (n->nlmsg_flags & NLM_F_REPLACE)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1508 ovr = 1;
aea0d727899140 Alexander Aring 2018-02-15 1509 ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, portid, ovr,
aea0d727899140 Alexander Aring 2018-02-15 1510 extack);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1511 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1512 case RTM_DELACTION:
7316ae88c43d47 Tom Goff 2010-03-19 1513 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
84ae017a007764 Alexander Aring 2018-02-15 1514 portid, RTM_DELACTION, extack);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1515 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1516 case RTM_GETACTION:
7316ae88c43d47 Tom Goff 2010-03-19 1517 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
84ae017a007764 Alexander Aring 2018-02-15 1518 portid, RTM_GETACTION, extack);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1519 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1520 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1521 BUG();
^1da177e4c3f41 Linus Torvalds 2005-04-16 1522 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1523
^1da177e4c3f41 Linus Torvalds 2005-04-16 1524 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1525 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1526
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[RFC PATCH omap-audio] rpmsg-kdrv: rpmsg_kdrv_demo_get_data() can be static
by kernel test robot
Fixes: c93833f581c6 ("rpmsg-kdrv: add access APIs from virtual drivers")
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
rpmsg_kdrv_demo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c b/drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c
index ff39933e5d6aa..fac88f9b36026 100644
--- a/drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c
+++ b/drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c
@@ -22,7 +22,7 @@ struct rpmsg_kdrv_demo_private {
ssize_t data_len;
};
-int rpmsg_kdrv_demo_get_data(struct rpmsg_remotedev *rdev, void *data, ssize_t len)
+static int rpmsg_kdrv_demo_get_data(struct rpmsg_remotedev *rdev, void *data, ssize_t len)
{
struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
@@ -38,7 +38,7 @@ int rpmsg_kdrv_demo_get_data(struct rpmsg_remotedev *rdev, void *data, ssize_t l
return priv->data_len;
}
-int rpmsg_kdrv_demo_ping(struct rpmsg_remotedev *rdev, void *ping_data, ssize_t ping_len)
+static int rpmsg_kdrv_demo_ping(struct rpmsg_remotedev *rdev, void *ping_data, ssize_t ping_len)
{
struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
struct rpmsg_kdrv_device *kddev = priv->kddev;
@@ -89,7 +89,7 @@ int rpmsg_kdrv_demo_ping(struct rpmsg_remotedev *rdev, void *ping_data, ssize_t
return ret;
}
-int rpmsg_kdrv_demo_c2s_message(struct rpmsg_remotedev *rdev, void *c2s_msg_data, ssize_t len)
+static int rpmsg_kdrv_demo_c2s_message(struct rpmsg_remotedev *rdev, void *c2s_msg_data, ssize_t len)
{
struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
struct rpmsg_kdrv_device *kddev = priv->kddev;
@@ -120,7 +120,7 @@ int rpmsg_kdrv_demo_c2s_message(struct rpmsg_remotedev *rdev, void *c2s_msg_data
}
-struct rpmsg_remotedev_demo_ops demo_ops = {
+static struct rpmsg_remotedev_demo_ops demo_ops = {
.get_data = rpmsg_kdrv_demo_get_data,
.ping = rpmsg_kdrv_demo_ping,
.c2s_message = rpmsg_kdrv_demo_c2s_message,
@@ -190,7 +190,7 @@ static int rpmsg_kdrv_demo_callback(struct rpmsg_kdrv_device *dev, void *msg, in
}
-struct rpmsg_kdrv_driver rpmsg_kdrv_demo = {
+static struct rpmsg_kdrv_driver rpmsg_kdrv_demo = {
.drv.name = "rpmsg-kdrv-demo",
.device_type = RPMSG_KDRV_TP_DEVICE_TYPE_DEMO,
.probe = rpmsg_kdrv_demo_probe,
2 years, 3 months
Re: [PATCH v3 6/6] staging: greybus: audio: Enable GB codec, audio module compilation.
by kernel test robot
Hi Vaibhav,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 98fe05e21a6e0ca242e974650ed58b64813cb2dc]
url: https://github.com/0day-ci/linux/commits/Vaibhav-Agarwal/Enable-Greybus-A...
base: 98fe05e21a6e0ca242e974650ed58b64813cb2dc
config: nds32-randconfig-r002-20200619 (attached as .config)
compiler: nds32le-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/staging/greybus/audio_helper.c:59:5: warning: no previous prototype for 'gbaudio_dapm_link_component_dai_widgets' [-Wmissing-prototypes]
59 | int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/greybus/audio_helper.c:112:5: warning: no previous prototype for 'gbaudio_dapm_free_controls' [-Wmissing-prototypes]
112 | int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/greybus/audio_helper.c:189:5: warning: no previous prototype for 'gbaudio_remove_component_controls' [-Wmissing-prototypes]
189 | int gbaudio_remove_component_controls(struct snd_soc_component *component,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers/staging/greybus/audio_topology.c: In function 'find_gb_module':
>> drivers/staging/greybus/audio_topology.c:31:14: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
31 | int dev_id, ret;
| ^~~
drivers/staging/greybus/audio_topology.c: In function 'gbcodec_mixer_dapm_ctl_get':
>> drivers/staging/greybus/audio_topology.c:380:33: warning: variable 'info' set but not used [-Wunused-but-set-variable]
380 | struct gb_audio_ctl_elem_info *info;
| ^~~~
vim +/gbaudio_dapm_link_component_dai_widgets +59 drivers/staging/greybus/audio_helper.c
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 58
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 @59 int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 60 struct snd_soc_dapm_context *dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 61 {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 62 struct snd_soc_dapm_widget *dai_w;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 63
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 64 /* For each DAI widget... */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 65 list_for_each_entry(dai_w, &card->widgets, list) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 66 if (dai_w->dapm != dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 67 continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 68 switch (dai_w->id) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 69 case snd_soc_dapm_dai_in:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 70 case snd_soc_dapm_dai_out:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 71 break;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 72 default:
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 73 continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 74 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 75 gbaudio_dapm_link_dai_widget(dai_w, card);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 76 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 77
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 78 return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 79 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 80
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 81 static void gbaudio_dapm_free_path(struct snd_soc_dapm_path *path)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 82 {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 83 list_del(&path->list_node[SND_SOC_DAPM_DIR_IN]);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 84 list_del(&path->list_node[SND_SOC_DAPM_DIR_OUT]);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 85 list_del(&path->list_kcontrol);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 86 list_del(&path->list);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 87 kfree(path);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 88 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 89
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 90 static void gbaudio_dapm_free_widget(struct snd_soc_dapm_widget *w)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 91 {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 92 struct snd_soc_dapm_path *p, *next_p;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 93 enum snd_soc_dapm_direction dir;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 94
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 95 list_del(&w->list);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 96 /*
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 97 * remove source and sink paths associated to this widget.
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 98 * While removing the path, remove reference to it from both
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 99 * source and sink widgets so that path is removed only once.
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 100 */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 101 gbaudio_dapm_for_each_direction(dir) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 102 snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 103 gbaudio_dapm_free_path(p);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 104 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 105
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 106 kfree(w->kcontrols);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 107 kfree_const(w->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 108 kfree_const(w->sname);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 109 kfree(w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 110 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 111
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 @112 int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 113 const struct snd_soc_dapm_widget *widget,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 114 int num)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 115 {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 116 int i;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 117 struct snd_soc_dapm_widget *w, *next_w;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 118 #ifdef CONFIG_DEBUG_FS
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 119 struct dentry *parent = dapm->debugfs_dapm;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 120 struct dentry *debugfs_w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 121 #endif
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 122
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 123 mutex_lock(&dapm->card->dapm_mutex);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 124 for (i = 0; i < num; i++) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 125 /* below logic can be optimized to identify widget pointer */
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 126 list_for_each_entry_safe(w, next_w, &dapm->card->widgets,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 127 list) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 128 if (w->dapm != dapm)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 129 continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 130 if (!strcmp(w->name, widget->name))
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 131 break;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 132 w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 133 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 134 if (!w) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 135 dev_err(dapm->dev, "%s: widget not found\n",
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 136 widget->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 137 return -EINVAL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 138 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 139 widget++;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 140 #ifdef CONFIG_DEBUG_FS
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 141 if (!parent)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 142 debugfs_w = debugfs_lookup(w->name, parent);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 143 debugfs_remove(debugfs_w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 144 debugfs_w = NULL;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 145 #endif
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 146 gbaudio_dapm_free_widget(w);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 147 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 148 mutex_unlock(&dapm->card->dapm_mutex);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 149 return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 150 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 151
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 152 static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 153 const struct snd_kcontrol_new *controls,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 154 int num_controls, const char *prefix)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 155 {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 156 int i, err;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 157
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 158 for (i = 0; i < num_controls; i++) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 159 const struct snd_kcontrol_new *control = &controls[i];
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 160 struct snd_ctl_elem_id id;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 161 struct snd_kcontrol *kctl;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 162
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 163 if (prefix)
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 164 snprintf(id.name, sizeof(id.name), "%s %s", prefix,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 165 control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 166 else
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 167 strlcpy(id.name, control->name, sizeof(id.name));
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 168 id.numid = 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 169 id.iface = control->iface;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 170 id.device = control->device;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 171 id.subdevice = control->subdevice;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 172 id.index = control->index;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 173 kctl = snd_ctl_find_id(card, &id);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 174 if (!kctl) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 175 dev_err(dev, "%d: Failed to find %s\n", err,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 176 control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 177 continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 178 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 179 err = snd_ctl_remove(card, kctl);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 180 if (err < 0) {
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 181 dev_err(dev, "%d: Failed to remove %s\n", err,
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 182 control->name);
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 183 continue;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 184 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 185 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 186 return 0;
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 187 }
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 188
1939631ddc545a7 Vaibhav Agarwal 2020-06-19 @189 int gbaudio_remove_component_controls(struct snd_soc_component *component,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[cel:ib-cm-tracepoints 2/2] drivers/infiniband/core/cm.c:2229:56: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: git://git.linux-nfs.org/projects/cel/cel-2.6.git ib-cm-tracepoints
head: 0f1fb23980d1722dd444f176751fc589536a6816
commit: 0f1fb23980d1722dd444f176751fc589536a6816 [2/2] RDMA/cm: Add tracepoints to record errors related to ib_cm events
config: x86_64-randconfig-s021-20200619 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-18-g27caae40-dirty
git checkout 0f1fb23980d1722dd444f176751fc589536a6816
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>)
drivers/infiniband/core/cm.c:1277:21: sparse: sparse: cast from restricted __be32
>> drivers/infiniband/core/cm.c:2229:56: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] local_id @@ got restricted __be32 [usertype] local_id @@
>> drivers/infiniband/core/cm.c:2229:56: sparse: expected unsigned int [usertype] local_id
>> drivers/infiniband/core/cm.c:2229:56: sparse: got restricted __be32 [usertype] local_id
vim +2229 drivers/infiniband/core/cm.c
2211
2212 int ib_send_cm_rep(struct ib_cm_id *cm_id,
2213 struct ib_cm_rep_param *param)
2214 {
2215 struct cm_id_private *cm_id_priv;
2216 struct ib_mad_send_buf *msg;
2217 struct cm_rep_msg *rep_msg;
2218 unsigned long flags;
2219 int ret;
2220
2221 if (param->private_data &&
2222 param->private_data_len > IB_CM_REP_PRIVATE_DATA_SIZE)
2223 return -EINVAL;
2224
2225 cm_id_priv = container_of(cm_id, struct cm_id_private, id);
2226 spin_lock_irqsave(&cm_id_priv->lock, flags);
2227 if (cm_id->state != IB_CM_REQ_RCVD &&
2228 cm_id->state != IB_CM_MRA_REQ_SENT) {
> 2229 trace_ib_cm_send_rep_err(cm_id_priv->id.local_id, cm_id->state);
2230 ret = -EINVAL;
2231 goto out;
2232 }
2233
2234 ret = cm_alloc_msg(cm_id_priv, &msg);
2235 if (ret)
2236 goto out;
2237
2238 rep_msg = (struct cm_rep_msg *) msg->mad;
2239 cm_format_rep(rep_msg, cm_id_priv, param);
2240 msg->timeout_ms = cm_id_priv->timeout_ms;
2241 msg->context[1] = (void *) (unsigned long) IB_CM_REP_SENT;
2242
2243 ret = ib_post_send_mad(msg, NULL);
2244 if (ret) {
2245 spin_unlock_irqrestore(&cm_id_priv->lock, flags);
2246 cm_free_msg(msg);
2247 return ret;
2248 }
2249
2250 cm_id->state = IB_CM_REP_SENT;
2251 cm_id_priv->msg = msg;
2252 cm_id_priv->initiator_depth = param->initiator_depth;
2253 cm_id_priv->responder_resources = param->responder_resources;
2254 cm_id_priv->rq_psn = cpu_to_be32(IBA_GET(CM_REP_STARTING_PSN, rep_msg));
2255 WARN_ONCE(param->qp_num & 0xFF000000,
2256 "IBTA declares QPN to be 24 bits, but it is 0x%X\n",
2257 param->qp_num);
2258 cm_id_priv->local_qpn = cpu_to_be32(param->qp_num & 0xFFFFFF);
2259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[plbossart-sound:fix/more-dpcm-fixes 5/5] sound/soc/soc-dai.c:428:26: warning: is used uninitialized in this function
by kernel test robot
tree: https://github.com/plbossart/sound fix/more-dpcm-fixes
head: daf63cf6c66926660b7ec88f6e017d97b30fc4d2
commit: daf63cf6c66926660b7ec88f6e017d97b30fc4d2 [5/5] ASoC: soc-dai: set dai_link dpcm_ flags with a helper
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout daf63cf6c66926660b7ec88f6e017d97b30fc4d2
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-dai.c: In function 'snd_soc_dai_link_set_capabilities':
>> sound/soc/soc-dai.c:428:26: warning: 'supported[1]' is used uninitialized in this function [-Wuninitialized]
428 | dai_link->dpcm_capture = supported[SNDRV_PCM_STREAM_CAPTURE];
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +428 sound/soc/soc-dai.c
393
394 /*
395 * snd_soc_dai_link_set_capabilities() - set dai_link properties based on its DAIs
396 */
397 void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link)
398 {
399 struct snd_soc_dai_link_component *cpu;
400 struct snd_soc_dai_link_component *codec;
401 struct snd_soc_dai *dai;
402 bool supported[SNDRV_PCM_STREAM_LAST];
403 int direction;
404 int i;
405
406 for_each_pcm_streams(direction) {
407 supported[direction] = true;
408
409 for_each_link_cpus(dai_link, i, cpu) {
410 dai = snd_soc_find_dai(cpu);
411 if (!dai || !snd_soc_dai_stream_valid(dai, direction)) {
412 supported[direction] = false;
413 break;
414 }
415 }
416 if (!supported[direction])
417 continue;
418 for_each_link_codecs(dai_link, i, codec) {
419 dai = snd_soc_find_dai(codec);
420 if (!dai || !snd_soc_dai_stream_valid(dai, direction)) {
421 supported[direction] = false;
422 break;
423 }
424 }
425 }
426
427 dai_link->dpcm_playback = supported[SNDRV_PCM_STREAM_PLAYBACK];
> 428 dai_link->dpcm_capture = supported[SNDRV_PCM_STREAM_CAPTURE];
429 }
430 EXPORT_SYMBOL_GPL(snd_soc_dai_link_set_capabilities);
431
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[morimoto-linux:fw-cleanup-2020-06-19-v1 80/146] sound/soc/soc-pcm.c:2651:13: warning: incompatible integer to pointer conversion assigning to 'int from 'int'
by kernel test robot
tree: https://github.com/morimoto/linux fw-cleanup-2020-06-19-v1
head: 050c38d477a06cdc6262ffe066cebd2d9d4dcd55
commit: dc0414aa072afe58af208d4c64e27d8fb23f8436 [80/146] ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm()
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout dc0414aa072afe58af208d4c64e27d8fb23f8436
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> sound/soc/soc-pcm.c:2651:13: warning: incompatible integer to pointer conversion assigning to 'int *' from 'int' [-Wint-conversion]
playback = 1;
^ ~
sound/soc/soc-pcm.c:2665:12: warning: incompatible integer to pointer conversion assigning to 'int *' from 'int' [-Wint-conversion]
capture = 1;
^ ~
2 warnings generated.
vim +2651 sound/soc/soc-pcm.c
01d7584cd2e5a93 Liam Girdwood 2012-04-25 2623
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2624 static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd,
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2625 int *playback, int *capture)
01d7584cd2e5a93 Liam Girdwood 2012-04-25 2626 {
2e5894d73789ee6 Benoit Cousson 2014-07-08 2627 struct snd_soc_dai *codec_dai;
19bdcc7aeed4169 Shreyas NC 2020-02-25 2628 struct snd_soc_dai *cpu_dai;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2629 int stream;
2e5894d73789ee6 Benoit Cousson 2014-07-08 2630 int i;
01d7584cd2e5a93 Liam Girdwood 2012-04-25 2631
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2632 if (rtd->dai_link->dynamic && rtd->num_cpus > 1) {
9b5db059366ae20 Stephan Gerhold 2020-04-15 2633 dev_err(rtd->dev,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2634 "DPCM doesn't support Multi CPU for Front-Ends yet\n");
9b5db059366ae20 Stephan Gerhold 2020-04-15 2635 return -EINVAL;
9b5db059366ae20 Stephan Gerhold 2020-04-15 2636 }
9b5db059366ae20 Stephan Gerhold 2020-04-15 2637
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2638 if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) {
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2639 if (rtd->dai_link->dpcm_playback) {
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2640 stream = SNDRV_PCM_STREAM_PLAYBACK;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2641
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2642 for_each_rtd_cpu_dais(rtd, i, cpu_dai)
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2643 if (!snd_soc_dai_stream_valid(cpu_dai,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2644 stream)) {
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2645 dev_err(rtd->card->dev,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2646 "CPU DAI %s for rtd %s does not support playback\n",
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2647 cpu_dai->name,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2648 rtd->dai_link->stream_name);
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2649 return -EINVAL;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2650 }
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 @2651 playback = 1;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2652 }
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2653 if (rtd->dai_link->dpcm_capture) {
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2654 stream = SNDRV_PCM_STREAM_CAPTURE;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2655
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2656 for_each_rtd_cpu_dais(rtd, i, cpu_dai)
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2657 if (!snd_soc_dai_stream_valid(cpu_dai,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2658 stream)) {
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2659 dev_err(rtd->card->dev,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2660 "CPU DAI %s for rtd %s does not support capture\n",
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2661 cpu_dai->name,
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2662 rtd->dai_link->stream_name);
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2663 return -EINVAL;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2664 }
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2665 capture = 1;
b73287f0b074596 Pierre-Louis Bossart 2020-06-08 2666 }
01d7584cd2e5a93 Liam Girdwood 2012-04-25 2667 } else {
a342031cdd0818c Jerome Brunet 2019-07-25 2668 /* Adapt stream for codec2codec links */
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2669 int cpu_capture = rtd->dai_link->params ?
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2670 SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE;
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2671 int cpu_playback = rtd->dai_link->params ?
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2672 SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
a342031cdd0818c Jerome Brunet 2019-07-25 2673
a4be4187b2bfc66 Kuninori Morimoto 2020-03-09 2674 for_each_rtd_codec_dais(rtd, i, codec_dai) {
19bdcc7aeed4169 Shreyas NC 2020-02-25 2675 if (rtd->num_cpus == 1) {
c2233a266178f89 Kuninori Morimoto 2020-03-30 2676 cpu_dai = asoc_rtd_to_cpu(rtd, 0);
19bdcc7aeed4169 Shreyas NC 2020-02-25 2677 } else if (rtd->num_cpus == rtd->num_codecs) {
c2233a266178f89 Kuninori Morimoto 2020-03-30 2678 cpu_dai = asoc_rtd_to_cpu(rtd, i);
19bdcc7aeed4169 Shreyas NC 2020-02-25 2679 } else {
19bdcc7aeed4169 Shreyas NC 2020-02-25 2680 dev_err(rtd->card->dev,
19bdcc7aeed4169 Shreyas NC 2020-02-25 2681 "N cpus to M codecs link is not supported yet\n");
19bdcc7aeed4169 Shreyas NC 2020-02-25 2682 return -EINVAL;
19bdcc7aeed4169 Shreyas NC 2020-02-25 2683 }
19bdcc7aeed4169 Shreyas NC 2020-02-25 2684
467fece8fbc6774 Kuninori Morimoto 2019-07-22 2685 if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2686 snd_soc_dai_stream_valid(cpu_dai, cpu_playback))
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2687 *playback = 1;
467fece8fbc6774 Kuninori Morimoto 2019-07-22 2688 if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
a4877a6fb2bd2e3 Stephan Gerhold 2020-02-18 2689 snd_soc_dai_stream_valid(cpu_dai, cpu_capture))
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2690 *capture = 1;
01d7584cd2e5a93 Liam Girdwood 2012-04-25 2691 }
2e5894d73789ee6 Benoit Cousson 2014-07-08 2692 }
2e5894d73789ee6 Benoit Cousson 2014-07-08 2693
d6bead020d8f8bc Fabio Estevam 2013-08-29 2694 if (rtd->dai_link->playback_only) {
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2695 *playback = 1;
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2696 *capture = 0;
d6bead020d8f8bc Fabio Estevam 2013-08-29 2697 }
d6bead020d8f8bc Fabio Estevam 2013-08-29 2698
d6bead020d8f8bc Fabio Estevam 2013-08-29 2699 if (rtd->dai_link->capture_only) {
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2700 *playback = 0;
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2701 *capture = 1;
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2702 }
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2703
dc0414aa072afe5 Kuninori Morimoto 2020-06-16 2704 return 0;
d6bead020d8f8bc Fabio Estevam 2013-08-29 2705 }
d6bead020d8f8bc Fabio Estevam 2013-08-29 2706
:::::: The code at line 2651 was first introduced by commit
:::::: b73287f0b0745961b14e5ebcce92cc8ed24d4d52 ASoC: soc-pcm: dpcm: fix playback/capture checks
:::::: TO: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months