linux-next: build warning after merge of the vhost tree

From: Stephen Rothwell
Date: Sun Dec 15 2019 - 22:49:46 EST


Hi all,

After merging the vhost tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/fcntl.h:5,
from include/linux/eventfd.h:12,
from drivers/vhost/vhost.c:13:
drivers/vhost/vhost.c: In function 'vhost_log_write':
include/linux/kernel.h:844:29: warning: comparison of distinct pointer types lacks a cast
844 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/kernel.h:858:4: note: in expansion of macro '__typecheck'
858 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/kernel.h:868:24: note: in expansion of macro '__safe_cmp'
868 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:877:19: note: in expansion of macro '__careful_cmp'
877 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
drivers/vhost/vhost.c:1968:11: note: in expansion of macro 'min'
1968 | u64 l = min(log[i].len, len);
| ^~~

Introduced by commit

b072ae74df17 ("vhost: use vhost_desc instead of vhost_log")

vhost_log::len was u64 and vhost_desc::len is u32 and len is u64.

--
Cheers,
Stephen Rothwell

Attachment: pgpiToQjp2pdp.pgp
Description: OpenPGP digital signature