[linux-stable-rc:linux-4.4.y 9131/9999] net/batman-adv/translation-table.c:948:17: warning: variable 'vid' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head: 95a3867e897abd7811196123f81a119a75aba863
commit: 415dad95105656862703c980006118ec28d8971c [9131/9999] batman-adv: Fix reference counting of vlan object for tt_local_entry
config: microblaze-randconfig-r032-20201209 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.4.y
git checkout 415dad95105656862703c980006118ec28d8971c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=microblaze
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 >>):
include/linux/rhashtable.h:277:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return atomic_read(&ht->nelems) < (tbl->size * 3 / 10) &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_100':
include/linux/rhashtable.h:289:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_max':
include/linux/rhashtable.h:302:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
^~
In file included from include/linux/etherdevice.h:26:0,
from net/batman-adv/main.h:170,
from net/batman-adv/translation-table.h:21,
from net/batman-adv/translation-table.c:18:
include/linux/netdevice.h: In function '__skb_gro_checksum_validate_needed':
include/linux/netdevice.h:2389:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
skb_checksum_start_offset(skb) <
^
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from arch/microblaze/include/asm/irqflags.h:12,
from include/linux/irqflags.h:15,
from arch/microblaze/include/asm/cmpxchg.h:4,
from arch/microblaze/include/asm/atomic.h:4,
from include/linux/atomic.h:4,
from net/batman-adv/main.h:166,
from net/batman-adv/translation-table.h:21,
from net/batman-adv/translation-table.c:18:
include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/linux/compiler.h:153:45: note: in definition of macro 'unlikely'
# define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
^
include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^~~~~~
include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/linux/compiler.h:153:53: note: in definition of macro 'unlikely'
# define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
^
include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^~~~~~
include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/linux/compiler.h:126:47: note: in definition of macro 'likely_notrace'
#define likely_notrace(x) __builtin_expect(!!(x), 1)
^
include/linux/compiler.h:153:58: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:56:36: note: in expansion of macro 'unlikely'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~
include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^~~~~~
In file included from include/linux/etherdevice.h:26:0,
from net/batman-adv/main.h:170,
from net/batman-adv/translation-table.h:21,
from net/batman-adv/translation-table.c:18:
include/linux/netdevice.h: In function 'netif_msg_init':
include/linux/netdevice.h:3301:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
^~
In file included from include/net/rtnetlink.h:5:0,
from net/batman-adv/soft-interface.h:23,
from net/batman-adv/translation-table.c:53:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:337:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
nlh->nlmsg_len <= remaining);
^~
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:372:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:405:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from net/batman-adv/soft-interface.h:23:0,
from net/batman-adv/translation-table.c:53:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^~
net/batman-adv/translation-table.c: In function 'batadv_tt_tvlv_container_update':
net/batman-adv/translation-table.c:884:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (tt_diff_len > bat_priv->soft_iface->mtu)
^
net/batman-adv/translation-table.c: In function 'batadv_tt_local_seq_print_text':
>> net/batman-adv/translation-table.c:948:17: warning: variable 'vid' set but not used [-Wunused-but-set-variable]
unsigned short vid;
^~~
In file included from include/linux/rhashtable.h:24:0,
from include/net/inet_frag.h:4,
from include/net/netns/ipv4.h:9,
from include/net/net_namespace.h:17,
from include/linux/netdevice.h:43,
from include/linux/etherdevice.h:26,
from net/batman-adv/main.h:170,
from net/batman-adv/translation-table.h:21,
from net/batman-adv/translation-table.c:18:
include/linux/jhash.h: In function 'jhash':
include/linux/jhash.h:90:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 12: c += (u32)k[11]<<24;
~~^~~~~~~~~~~~~~~~~
include/linux/jhash.h:91:2: note: here
case 11: c += (u32)k[10]<<16;
^~~~
include/linux/jhash.h:91:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 11: c += (u32)k[10]<<16;
~~^~~~~~~~~~~~~~~~~
include/linux/jhash.h:92:2: note: here
case 10: c += (u32)k[9]<<8;
^~~~
include/linux/jhash.h:92:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 10: c += (u32)k[9]<<8;
~~^~~~~~~~~~~~~~~
include/linux/jhash.h:93:2: note: here
case 9: c += k[8];
^~~~
include/linux/jhash.h:93:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 9: c += k[8];
~~^~~~~~~
include/linux/jhash.h:94:2: note: here
case 8: b += (u32)k[7]<<24;
^~~~
include/linux/jhash.h:94:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 8: b += (u32)k[7]<<24;
~~^~~~~~~~~~~~~~~~
include/linux/jhash.h:95:2: note: here
case 7: b += (u32)k[6]<<16;
^~~~
include/linux/jhash.h:95:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: b += (u32)k[6]<<16;
~~^~~~~~~~~~~~~~~~
include/linux/jhash.h:96:2: note: here
case 6: b += (u32)k[5]<<8;
^~~~
include/linux/jhash.h:96:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 6: b += (u32)k[5]<<8;
~~^~~~~~~~~~~~~~~
include/linux/jhash.h:97:2: note: here
case 5: b += k[4];
^~~~
include/linux/jhash.h:97:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 5: b += k[4];
~~^~~~~~~
include/linux/jhash.h:98:2: note: here
case 4: a += (u32)k[3]<<24;
^~~~
include/linux/jhash.h:98:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 4: a += (u32)k[3]<<24;
~~^~~~~~~~~~~~~~~~
include/linux/jhash.h:99:2: note: here
case 3: a += (u32)k[2]<<16;
^~~~
include/linux/jhash.h:99:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 3: a += (u32)k[2]<<16;
~~^~~~~~~~~~~~~~~~
include/linux/jhash.h:100:2: note: here
case 2: a += (u32)k[1]<<8;
^~~~
include/linux/jhash.h:100:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 2: a += (u32)k[1]<<8;
~~^~~~~~~~~~~~~~~
include/linux/jhash.h:101:2: note: here
case 1: a += k[0];
^~~~
vim +/vid +948 net/batman-adv/translation-table.c
c6c8fea29769d9 Sven Eckelmann 2010-12-13 938
08c36d3e8ad1f7 Sven Eckelmann 2012-05-12 939 int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
c6c8fea29769d9 Sven Eckelmann 2010-12-13 940 {
c6c8fea29769d9 Sven Eckelmann 2010-12-13 941 struct net_device *net_dev = (struct net_device *)seq->private;
56303d34a332be Sven Eckelmann 2012-06-05 942 struct batadv_priv *bat_priv = netdev_priv(net_dev);
807736f6e00714 Sven Eckelmann 2012-07-15 943 struct batadv_hashtable *hash = bat_priv->tt.local_hash;
56303d34a332be Sven Eckelmann 2012-06-05 944 struct batadv_tt_common_entry *tt_common_entry;
85766a82003ec5 Antonio Quartulli 2012-11-08 945 struct batadv_tt_local_entry *tt_local;
56303d34a332be Sven Eckelmann 2012-06-05 946 struct batadv_hard_iface *primary_if;
c6c8fea29769d9 Sven Eckelmann 2010-12-13 947 struct hlist_head *head;
7ea7b4a142758d Antonio Quartulli 2013-07-30 @948 unsigned short vid;
6b5e971a282c0e Sven Eckelmann 2015-05-26 949 u32 i;
85766a82003ec5 Antonio Quartulli 2012-11-08 950 int last_seen_secs;
85766a82003ec5 Antonio Quartulli 2012-11-08 951 int last_seen_msecs;
85766a82003ec5 Antonio Quartulli 2012-11-08 952 unsigned long last_seen_jiffies;
85766a82003ec5 Antonio Quartulli 2012-11-08 953 bool no_purge;
6b5e971a282c0e Sven Eckelmann 2015-05-26 954 u16 np_flag = BATADV_TT_CLIENT_NOPURGE;
32ae9b221e7884 Marek Lindner 2011-04-20 955
30da63a6af1dbf Marek Lindner 2012-08-03 956 primary_if = batadv_seq_print_text_primary_if_get(seq);
30da63a6af1dbf Marek Lindner 2012-08-03 957 if (!primary_if)
32ae9b221e7884 Marek Lindner 2011-04-20 958 goto out;
c6c8fea29769d9 Sven Eckelmann 2010-12-13 959
86ceb360565d06 Sven Eckelmann 2012-03-07 960 seq_printf(seq,
7ea7b4a142758d Antonio Quartulli 2013-07-30 961 "Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n",
6b5e971a282c0e Sven Eckelmann 2015-05-26 962 net_dev->name, (u8)atomic_read(&bat_priv->tt.vn));
dd24ddb265b329 Antonio Quartulli 2013-11-16 963 seq_printf(seq, " %-13s %s %-8s %-9s (%-10s)\n", "Client", "VID",
7ea7b4a142758d Antonio Quartulli 2013-07-30 964 "Flags", "Last seen", "CRC");
c6c8fea29769d9 Sven Eckelmann 2010-12-13 965
c6c8fea29769d9 Sven Eckelmann 2010-12-13 966 for (i = 0; i < hash->size; i++) {
c6c8fea29769d9 Sven Eckelmann 2010-12-13 967 head = &hash->table[i];
c6c8fea29769d9 Sven Eckelmann 2010-12-13 968
7aadf889e89715 Marek Lindner 2011-02-18 969 rcu_read_lock();
b67bfe0d42cac5 Sasha Levin 2013-02-27 970 hlist_for_each_entry_rcu(tt_common_entry,
7aadf889e89715 Marek Lindner 2011-02-18 971 head, hash_entry) {
85766a82003ec5 Antonio Quartulli 2012-11-08 972 tt_local = container_of(tt_common_entry,
85766a82003ec5 Antonio Quartulli 2012-11-08 973 struct batadv_tt_local_entry,
85766a82003ec5 Antonio Quartulli 2012-11-08 974 common);
7ea7b4a142758d Antonio Quartulli 2013-07-30 975 vid = tt_common_entry->vid;
85766a82003ec5 Antonio Quartulli 2012-11-08 976 last_seen_jiffies = jiffies - tt_local->last_seen;
85766a82003ec5 Antonio Quartulli 2012-11-08 977 last_seen_msecs = jiffies_to_msecs(last_seen_jiffies);
85766a82003ec5 Antonio Quartulli 2012-11-08 978 last_seen_secs = last_seen_msecs / 1000;
85766a82003ec5 Antonio Quartulli 2012-11-08 979 last_seen_msecs = last_seen_msecs % 1000;
85766a82003ec5 Antonio Quartulli 2012-11-08 980
85766a82003ec5 Antonio Quartulli 2012-11-08 981 no_purge = tt_common_entry->flags & np_flag;
85766a82003ec5 Antonio Quartulli 2012-11-08 982
7ea7b4a142758d Antonio Quartulli 2013-07-30 983 seq_printf(seq,
dd24ddb265b329 Antonio Quartulli 2013-11-16 984 " * %pM %4i [%c%c%c%c%c%c] %3u.%03u (%#.8x)\n",
48100bac89a616 Antonio Quartulli 2011-10-30 985 tt_common_entry->addr,
1605278901718e Antonio Quartulli 2013-06-04 986 BATADV_PRINT_VID(tt_common_entry->vid),
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 987 ((tt_common_entry->flags &
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 988 BATADV_TT_CLIENT_ROAM) ? 'R' : '.'),
85766a82003ec5 Antonio Quartulli 2012-11-08 989 no_purge ? 'P' : '.',
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 990 ((tt_common_entry->flags &
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 991 BATADV_TT_CLIENT_NEW) ? 'N' : '.'),
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 992 ((tt_common_entry->flags &
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 993 BATADV_TT_CLIENT_PENDING) ? 'X' : '.'),
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 994 ((tt_common_entry->flags &
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 995 BATADV_TT_CLIENT_WIFI) ? 'W' : '.'),
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 996 ((tt_common_entry->flags &
a2f2b6cd41f5b4 Sven Eckelmann 2015-04-23 997 BATADV_TT_CLIENT_ISOLA) ? 'I' : '.'),
a7966d908ae847 Antonio Quartulli 2013-01-24 998 no_purge ? 0 : last_seen_secs,
7ea7b4a142758d Antonio Quartulli 2013-07-30 999 no_purge ? 0 : last_seen_msecs,
415dad95105656 Sven Eckelmann 2020-03-18 1000 tt_local->vlan->tt.crc);
c6c8fea29769d9 Sven Eckelmann 2010-12-13 1001 }
7aadf889e89715 Marek Lindner 2011-02-18 1002 rcu_read_unlock();
c6c8fea29769d9 Sven Eckelmann 2010-12-13 1003 }
32ae9b221e7884 Marek Lindner 2011-04-20 1004 out:
32ae9b221e7884 Marek Lindner 2011-04-20 1005 if (primary_if)
e5d89254bf763d Sven Eckelmann 2012-05-12 1006 batadv_hardif_free_ref(primary_if);
30da63a6af1dbf Marek Lindner 2012-08-03 1007 return 0;
c6c8fea29769d9 Sven Eckelmann 2010-12-13 1008 }
c6c8fea29769d9 Sven Eckelmann 2010-12-13 1009
:::::: The code at line 948 was first introduced by commit
:::::: 7ea7b4a142758deaf46c1af0ca9ceca6dd55138b batman-adv: make the TT CRC logic VLAN specific
:::::: TO: Antonio Quartulli <antonio(a)open-mesh.com>
:::::: CC: Antonio Quartulli <antonio(a)meshcoding.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Inquiry
by Amit
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
**** Commercial use of this software is prohibited ****
**** Please purchase a license to remove this notice ****
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
**** Commercial use of this software is prohibited ****
**** Please purchase a license to remove this notice ****
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
1 year, 9 months
Re: [PATCH 3/4] dma-buf: begin/end_cpu might lock the dma_resv lock
by kernel test robot
Hi Daniel,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20201211]
[also build test ERROR on v5.10-rc7]
[cannot apply to tegra-drm/drm/tegra/for-next linus/master v5.10-rc7 v5.10-rc6 v5.10-rc5]
[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/Daniel-Vetter/dma-buf-Remove-kma...
base: 3cc2bd440f2171f093b3a8480a4b54d8c270ed38
config: powerpc64-randconfig-r035-20201210 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
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
# https://github.com/0day-ci/linux/commit/24d4fcf0e09c80974556c7639cb630f86...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Vetter/dma-buf-Remove-kmap-kerneldoc-vestiges/20201212-000040
git checkout 24d4fcf0e09c80974556c7639cb630f86a544378
# 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/dma-buf/dma-buf.c:1121:14: error: use of undeclared identifier 'dma_buf'
might_lock(&dma_buf->resv.lock);
^
>> drivers/dma-buf/dma-buf.c:1121:14: error: use of undeclared identifier 'dma_buf'
>> drivers/dma-buf/dma-buf.c:1121:14: error: use of undeclared identifier 'dma_buf'
drivers/dma-buf/dma-buf.c:1156:14: error: use of undeclared identifier 'dma_buf'
might_lock(&dma_buf->resv.lock);
^
drivers/dma-buf/dma-buf.c:1156:14: error: use of undeclared identifier 'dma_buf'
drivers/dma-buf/dma-buf.c:1156:14: error: use of undeclared identifier 'dma_buf'
6 errors generated.
vim +/dma_buf +1121 drivers/dma-buf/dma-buf.c
1093
1094 /**
1095 * dma_buf_begin_cpu_access - Must be called before accessing a dma_buf from the
1096 * cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific
1097 * preparations. Coherency is only guaranteed in the specified range for the
1098 * specified access direction.
1099 * @dmabuf: [in] buffer to prepare cpu access for.
1100 * @direction: [in] length of range for cpu access.
1101 *
1102 * After the cpu access is complete the caller should call
1103 * dma_buf_end_cpu_access(). Only when cpu access is braketed by both calls is
1104 * it guaranteed to be coherent with other DMA access.
1105 *
1106 * This function will also wait for any DMA transactions tracked through
1107 * implicit synchronization in &dma_buf.resv. For DMA transactions with explicit
1108 * synchronization this function will only ensure cache coherency, callers must
1109 * ensure synchronization with such DMA transactions on their own.
1110 *
1111 * Can return negative error values, returns 0 on success.
1112 */
1113 int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
1114 enum dma_data_direction direction)
1115 {
1116 int ret = 0;
1117
1118 if (WARN_ON(!dmabuf))
1119 return -EINVAL;
1120
> 1121 might_lock(&dma_buf->resv.lock);
1122
1123 if (dmabuf->ops->begin_cpu_access)
1124 ret = dmabuf->ops->begin_cpu_access(dmabuf, direction);
1125
1126 /* Ensure that all fences are waited upon - but we first allow
1127 * the native handler the chance to do so more efficiently if it
1128 * chooses. A double invocation here will be reasonably cheap no-op.
1129 */
1130 if (ret == 0)
1131 ret = __dma_buf_begin_cpu_access(dmabuf, direction);
1132
1133 return ret;
1134 }
1135 EXPORT_SYMBOL_GPL(dma_buf_begin_cpu_access);
1136
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v7 1/4] HID: i2c-hid: Reorganize so ACPI and OF are separate modules
by kernel test robot
Hi Douglas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on hid/for-next]
[also build test WARNING on next-20201211]
[cannot apply to jikos-trivial/for-next v5.10-rc7]
[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/Douglas-Anderson/HID-i2c-hid-Reo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
# https://github.com/0day-ci/linux/commit/5a371169c8cc2abb463e32db3a3fe60ea...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Douglas-Anderson/HID-i2c-hid-Reorganize-to-allow-supporting-goodix-gt7375p/20201212-014239
git checkout 5a371169c8cc2abb463e32db3a3fe60ea34efc87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/hid/i2c-hid/i2c-hid-core.c:1050:5: warning: no previous prototype for 'i2c_hid_core_suspend' [-Wmissing-prototypes]
1050 | int i2c_hid_core_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/hid/i2c-hid/i2c-hid-core.c:1084:5: warning: no previous prototype for 'i2c_hid_core_resume' [-Wmissing-prototypes]
1084 | int i2c_hid_core_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
vim +/i2c_hid_core_suspend +1050 drivers/hid/i2c-hid/i2c-hid-core.c
1048
1049 #ifdef CONFIG_PM_SLEEP
> 1050 int i2c_hid_core_suspend(struct device *dev)
1051 {
1052 struct i2c_client *client = to_i2c_client(dev);
1053 struct i2c_hid *ihid = i2c_get_clientdata(client);
1054 struct hid_device *hid = ihid->hid;
1055 int ret;
1056 int wake_status;
1057
1058 if (hid->driver && hid->driver->suspend) {
1059 ret = hid->driver->suspend(hid, PMSG_SUSPEND);
1060 if (ret < 0)
1061 return ret;
1062 }
1063
1064 /* Save some power */
1065 i2c_hid_set_power(client, I2C_HID_PWR_SLEEP);
1066
1067 disable_irq(client->irq);
1068
1069 if (device_may_wakeup(&client->dev)) {
1070 wake_status = enable_irq_wake(client->irq);
1071 if (!wake_status)
1072 ihid->irq_wake_enabled = true;
1073 else
1074 hid_warn(hid, "Failed to enable irq wake: %d\n",
1075 wake_status);
1076 } else {
1077 i2c_hid_core_power_down(ihid);
1078 }
1079
1080 return 0;
1081 }
1082 EXPORT_SYMBOL_GPL(i2c_hid_core_suspend);
1083
> 1084 int i2c_hid_core_resume(struct device *dev)
1085 {
1086 int ret;
1087 struct i2c_client *client = to_i2c_client(dev);
1088 struct i2c_hid *ihid = i2c_get_clientdata(client);
1089 struct hid_device *hid = ihid->hid;
1090 int wake_status;
1091
1092 if (!device_may_wakeup(&client->dev)) {
1093 i2c_hid_core_power_up(ihid);
1094 } else if (ihid->irq_wake_enabled) {
1095 wake_status = disable_irq_wake(client->irq);
1096 if (!wake_status)
1097 ihid->irq_wake_enabled = false;
1098 else
1099 hid_warn(hid, "Failed to disable irq wake: %d\n",
1100 wake_status);
1101 }
1102
1103 enable_irq(client->irq);
1104
1105 /* Instead of resetting device, simply powers the device on. This
1106 * solves "incomplete reports" on Raydium devices 2386:3118 and
1107 * 2386:4B33 and fixes various SIS touchscreens no longer sending
1108 * data after a suspend/resume.
1109 *
1110 * However some ALPS touchpads generate IRQ storm without reset, so
1111 * let's still reset them here.
1112 */
1113 if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME)
1114 ret = i2c_hid_hwreset(client);
1115 else
1116 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
1117
1118 if (ret)
1119 return ret;
1120
1121 if (hid->driver && hid->driver->reset_resume) {
1122 ret = hid->driver->reset_resume(hid);
1123 return ret;
1124 }
1125
1126 return 0;
1127 }
1128 EXPORT_SYMBOL_GPL(i2c_hid_core_resume);
1129 #endif
1130
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[RFC PATCH] drm/i915: skl_plane_ctl_crtc() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
intel_gen9_plane.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_gen9_plane.c b/drivers/gpu/drm/i915/display/intel_gen9_plane.c
index d547edabb5ce7..8549b262f095e 100644
--- a/drivers/gpu/drm/i915/display/intel_gen9_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_gen9_plane.c
@@ -1393,7 +1393,7 @@ static u32 cnl_plane_ctl_flip(unsigned int reflect)
return 0;
}
-u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
+static u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
u32 plane_ctl = 0;
@@ -1413,8 +1413,8 @@ u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
return plane_ctl;
}
-u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
- const struct intel_plane_state *plane_state)
+static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *plane_state)
{
struct drm_i915_private *dev_priv =
to_i915(plane_state->uapi.plane->dev);
@@ -1452,7 +1452,7 @@ u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
return plane_ctl;
}
-u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
+static u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
u32 plane_color_ctl = 0;
@@ -1469,8 +1469,8 @@ u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
return plane_color_ctl;
}
-u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
- const struct intel_plane_state *plane_state)
+static u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *plane_state)
{
struct drm_i915_private *dev_priv =
to_i915(plane_state->uapi.plane->dev);
1 year, 9 months
Re: [Intel-gfx] [PATCH 09/11] drm/i915: migrate skl planes code new file
by kernel test robot
Hi Dave,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20201211]
[cannot apply to v5.10-rc7]
[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/Dave-Airlie/drm-i915-display-mov...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-s022-20201210 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://github.com/0day-ci/linux/commit/a5c9dca8844730c679e9716efd016bfe0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dave-Airlie/drm-i915-display-move-needs_modeset-to-an-inline-in-header/20201211-163119
git checkout a5c9dca8844730c679e9716efd016bfe04f9d002
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/gpu/drm/i915/display/intel_gen9_plane.c:1396:5: sparse: sparse: symbol 'skl_plane_ctl_crtc' was not declared. Should it be static?
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1416:5: sparse: sparse: symbol 'skl_plane_ctl' was not declared. Should it be static?
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1455:5: sparse: sparse: symbol 'glk_plane_color_ctl_crtc' was not declared. Should it be static?
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1472:5: sparse: sparse: symbol 'glk_plane_color_ctl' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [Intel-gfx] [PATCH 09/11] drm/i915: migrate skl planes code new file
by kernel test robot
Hi Dave,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20201211]
[cannot apply to v5.10-rc7]
[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/Dave-Airlie/drm-i915-display-mov...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-s002-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://github.com/0day-ci/linux/commit/a5c9dca8844730c679e9716efd016bfe0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dave-Airlie/drm-i915-display-move-needs_modeset-to-an-inline-in-header/20201211-163119
git checkout a5c9dca8844730c679e9716efd016bfe04f9d002
# 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>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1396:5: error: no previous prototype for 'skl_plane_ctl_crtc' [-Werror=missing-prototypes]
1396 | u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
| ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1416:5: error: no previous prototype for 'skl_plane_ctl' [-Werror=missing-prototypes]
1416 | u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
| ^~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1455:5: error: no previous prototype for 'glk_plane_color_ctl_crtc' [-Werror=missing-prototypes]
1455 | u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1472:5: error: no previous prototype for 'glk_plane_color_ctl' [-Werror=missing-prototypes]
1472 | u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/skl_plane_ctl_crtc +1396 drivers/gpu/drm/i915/display/intel_gen9_plane.c
1395
> 1396 u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
1397 {
1398 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
1399 u32 plane_ctl = 0;
1400
1401 if (crtc_state->uapi.async_flip)
1402 plane_ctl |= PLANE_CTL_ASYNC_FLIP;
1403
1404 if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
1405 return plane_ctl;
1406
1407 if (crtc_state->gamma_enable)
1408 plane_ctl |= PLANE_CTL_PIPE_GAMMA_ENABLE;
1409
1410 if (crtc_state->csc_enable)
1411 plane_ctl |= PLANE_CTL_PIPE_CSC_ENABLE;
1412
1413 return plane_ctl;
1414 }
1415
> 1416 u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
1417 const struct intel_plane_state *plane_state)
1418 {
1419 struct drm_i915_private *dev_priv =
1420 to_i915(plane_state->uapi.plane->dev);
1421 const struct drm_framebuffer *fb = plane_state->hw.fb;
1422 unsigned int rotation = plane_state->hw.rotation;
1423 const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
1424 u32 plane_ctl;
1425
1426 plane_ctl = PLANE_CTL_ENABLE;
1427
1428 if (INTEL_GEN(dev_priv) < 10 && !IS_GEMINILAKE(dev_priv)) {
1429 plane_ctl |= skl_plane_ctl_alpha(plane_state);
1430 plane_ctl |= PLANE_CTL_PLANE_GAMMA_DISABLE;
1431
1432 if (plane_state->hw.color_encoding == DRM_COLOR_YCBCR_BT709)
1433 plane_ctl |= PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709;
1434
1435 if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
1436 plane_ctl |= PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE;
1437 }
1438
1439 plane_ctl |= skl_plane_ctl_format(fb->format->format);
1440 plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
1441 plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
1442
1443 if (INTEL_GEN(dev_priv) >= 10)
1444 plane_ctl |= cnl_plane_ctl_flip(rotation &
1445 DRM_MODE_REFLECT_MASK);
1446
1447 if (key->flags & I915_SET_COLORKEY_DESTINATION)
1448 plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
1449 else if (key->flags & I915_SET_COLORKEY_SOURCE)
1450 plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
1451
1452 return plane_ctl;
1453 }
1454
> 1455 u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
1456 {
1457 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
1458 u32 plane_color_ctl = 0;
1459
1460 if (INTEL_GEN(dev_priv) >= 11)
1461 return plane_color_ctl;
1462
1463 if (crtc_state->gamma_enable)
1464 plane_color_ctl |= PLANE_COLOR_PIPE_GAMMA_ENABLE;
1465
1466 if (crtc_state->csc_enable)
1467 plane_color_ctl |= PLANE_COLOR_PIPE_CSC_ENABLE;
1468
1469 return plane_color_ctl;
1470 }
1471
> 1472 u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
1473 const struct intel_plane_state *plane_state)
1474 {
1475 struct drm_i915_private *dev_priv =
1476 to_i915(plane_state->uapi.plane->dev);
1477 const struct drm_framebuffer *fb = plane_state->hw.fb;
1478 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
1479 u32 plane_color_ctl = 0;
1480
1481 plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
1482 plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
1483
1484 if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
1485 switch (plane_state->hw.color_encoding) {
1486 case DRM_COLOR_YCBCR_BT709:
1487 plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
1488 break;
1489 case DRM_COLOR_YCBCR_BT2020:
1490 plane_color_ctl |=
1491 PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;
1492 break;
1493 default:
1494 plane_color_ctl |=
1495 PLANE_COLOR_CSC_MODE_YUV601_TO_RGB601;
1496 }
1497 if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
1498 plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
1499 } else if (fb->format->is_yuv) {
1500 plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
1501 }
1502
1503 return plane_color_ctl;
1504 }
1505
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH] kunit: Print test statistics on failure
by kernel test robot
Hi David,
I love your patch! Yet something to improve:
[auto build test ERROR on 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a]
url: https://github.com/0day-ci/linux/commits/David-Gow/kunit-Print-test-stati...
base: 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a
config: c6x-randconfig-r004-20201210 (attached as .config)
compiler: c6x-elf-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
# https://github.com/0day-ci/linux/commit/2bdf1b55a1b3673a1a02f71457fc52b49...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Gow/kunit-Print-test-statistics-on-failure/20201211-153009
git checkout 2bdf1b55a1b3673a1a02f71457fc52b497fc7223
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
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 >>):
>> lib/kunit/test.c:27:53: error: expected ')' before 'int'
27 | core_param(kunit_stats_enabled, kunit_stats_enabled, int, 0644);
| ^~~~
| )
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_test_stats':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:14: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:20: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
lib/kunit/test.c: In function 'kunit_log_append':
lib/kunit/test.c:72:2: warning: function 'kunit_log_append' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
72 | vsnprintf(line, sizeof(line), fmt, args);
| ^~~~~~~~~
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_suite_stats':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:15: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:21: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:40: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
vim +27 lib/kunit/test.c
19
20 /*
21 * KUnit statistic mode:
22 * 0 - disabled
23 * 1 - only when there is at least one failure, and more than one subtest
24 * 2 - enabled
25 */
26 static int kunit_stats_enabled = 1;
> 27 core_param(kunit_stats_enabled, kunit_stats_enabled, int, 0644);
28
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH] kunit: Print test statistics on failure
by kernel test robot
Hi David,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a]
url: https://github.com/0day-ci/linux/commits/David-Gow/kunit-Print-test-stati...
base: 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a
config: arc-randconfig-r006-20201210 (attached as .config)
compiler: arceb-elf-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
# https://github.com/0day-ci/linux/commit/2bdf1b55a1b3673a1a02f71457fc52b49...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Gow/kunit-Print-test-statistics-on-failure/20201211-153009
git checkout 2bdf1b55a1b3673a1a02f71457fc52b497fc7223
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 >>):
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_test_stats':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:14: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:20: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
lib/kunit/test.c: In function 'kunit_log_append':
lib/kunit/test.c:72:2: warning: function 'kunit_log_append' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
72 | vsnprintf(line, sizeof(line), fmt, args);
| ^~~~~~~~~
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_suite_stats':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:15: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:21: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:40: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:46: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months