From: kernel test robot <lkp@intel.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Juergen Gross <jgross@suse.com>
Subject: arch/x86/xen/enlighten_pvh.c:55:10: warning: comparison of distinct pointer types ('typeof (ret * sizeof(char)) *' (aka 'unsigned long *') and 'typeof (sizeof (op.u.dom0_console)) *' (aka 'unsigned int *'))
Date: Tue, 21 Mar 2023 04:45:28 +0800 [thread overview]
Message-ID: <202303210458.T1bzVRT2-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7d31677bb7b1944ac89e9155110dc1b9acbb3895
commit: 934ef33ee75c3846f605f18b65048acd147e3918 x86/PVH: obtain VGA console info in Dom0
date: 6 days ago
config: i386-buildonly-randconfig-r006-20230320 (https://download.01.org/0day-ci/archive/20230321/202303210458.T1bzVRT2-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=934ef33ee75c3846f605f18b65048acd147e3918
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 934ef33ee75c3846f605f18b65048acd147e3918
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/xen/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303210458.T1bzVRT2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/xen/enlighten_pvh.c:55:10: warning: comparison of distinct pointer types ('typeof (ret * sizeof(char)) *' (aka 'unsigned long *') and 'typeof (sizeof (op.u.dom0_console)) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
min(ret * sizeof(char),
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +55 arch/x86/xen/enlighten_pvh.c
27
28 void __init xen_pvh_init(struct boot_params *boot_params)
29 {
30 u32 msr;
31 u64 pfn;
32
33 xen_pvh = 1;
34 xen_domain_type = XEN_HVM_DOMAIN;
35 xen_start_flags = pvh_start_info.flags;
36
37 msr = cpuid_ebx(xen_cpuid_base() + 2);
38 pfn = __pa(hypercall_page);
39 wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
40
41 if (xen_initial_domain())
42 x86_init.oem.arch_setup = xen_add_preferred_consoles;
43 x86_init.oem.banner = xen_banner;
44
45 xen_efi_init(boot_params);
46
47 if (xen_initial_domain()) {
48 struct xen_platform_op op = {
49 .cmd = XENPF_get_dom0_console,
50 };
51 long ret = HYPERVISOR_platform_op(&op);
52
53 if (ret > 0)
54 xen_init_vga(&op.u.dom0_console,
> 55 min(ret * sizeof(char),
56 sizeof(op.u.dom0_console)),
57 &boot_params->screen_info);
58 }
59 }
60
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-03-20 20:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202303210458.T1bzVRT2-lkp@intel.com \
--to=lkp@intel.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox