kvm-ppc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Graf <graf@amazon.com>
Cc: oe-kbuild-all@lists.linux.dev, kvm-ppc@vger.kernel.org
Subject: [agraf-2.6:kvm-kho-gmem-test 24/27] drivers/misc/fdbox.c:504:12: error: initializing 'ulong *' (aka 'unsigned long *') with an expression of type 'const void *' discards qualifiers
Date: Sun, 5 May 2024 03:59:40 +0800	[thread overview]
Message-ID: <202405050321.MKZxcasf-lkp@intel.com> (raw)

tree:   https://github.com/agraf/linux-2.6.git kvm-kho-gmem-test
head:   9a58862a298a63bad21d05191e28b857063bb9dc
commit: eac026594b9dc0e92a0093a3443b9bc973be99a4 [24/27] XXX WIP
config: i386-randconfig-141-20240505 (https://download.01.org/0day-ci/archive/20240505/202405050321.MKZxcasf-lkp@intel.com/config)
compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240505/202405050321.MKZxcasf-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405050321.MKZxcasf-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/misc/fdbox.c:13:
   include/linux/kexec.h:369:20: error: field has incomplete type 'struct kexec_buf'
     369 |                 struct kexec_buf dt;
         |                                  ^
   include/linux/kexec.h:369:10: note: forward declaration of 'struct kexec_buf'
     369 |                 struct kexec_buf dt;
         |                        ^
   include/linux/kexec.h:370:20: error: field has incomplete type 'struct kexec_buf'
     370 |                 struct kexec_buf mem_cache;
         |                                  ^
   include/linux/kexec.h:369:10: note: forward declaration of 'struct kexec_buf'
     369 |                 struct kexec_buf dt;
         |                        ^
>> drivers/misc/fdbox.c:504:12: error: initializing 'ulong *' (aka 'unsigned long *') with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     504 |                                 ulong *link = fdt_getprop(fdt, fd, "link", &l);
         |                                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   3 errors generated.


vim +504 drivers/misc/fdbox.c

   448	
   449	static void fdbox_kho_recover(void)
   450	{
   451		const void *fdt = kho_get_fdt();
   452		const char *path = "/fdbox";
   453		int fdbox, box, fd;
   454		int err;
   455	
   456		/* Not a KHO boot */
   457		if (!fdt)
   458			return;
   459	
   460		fdbox = fdt_path_offset(fdt, path);
   461		if (fdbox < 0) {
   462			pr_debug("Could not find '%s' in DT", path);
   463			return;
   464		}
   465	
   466		err = fdt_node_check_compatible(fdt, fdbox, "fdbox-v1");
   467		if (err) {
   468			char p[256] = "";
   469			fdt_get_path(fdt, fdbox, p, sizeof(p) - 1);
   470			pr_warn("Node '%s' has invalid compatible", p);
   471			return;
   472		}
   473	
   474		fdt_for_each_subnode(box, fdt, fdbox) {
   475			struct fdbox_create_box create_box = {
   476				.flags = 0,
   477			};
   478			struct box *new_box;
   479	
   480			strncpy(create_box.name, fdt_get_name(fdt, box, NULL), sizeof(create_box.name) - 1);
   481	
   482			err = fdt_node_check_compatible(fdt, box, "fdbox,box-v1");
   483			if (err) {
   484				char p[256] = "";
   485				fdt_get_path(fdt, box, p, sizeof(p) - 1);
   486				pr_warn("Node '%s' has invalid compatible", p);
   487				continue;
   488			}
   489	
   490			err = _fdbox_create_box(&create_box, &new_box);
   491			if (err) {
   492				char p[256] = "";
   493				fdt_get_path(fdt, box, p, sizeof(p) - 1);
   494				pr_warn("Node '%s' could not spawn", p);
   495				continue;
   496			}
   497	
   498			new_box->wrapped = true;
   499			
   500			fdt_for_each_subnode(fd, fdt, box) {
   501				if (!fdt_node_check_compatible(fdt, fd, "fdbox,fd-v1")) {
   502					int l;
   503					struct box_dangle *dangle;
 > 504					ulong *link = fdt_getprop(fdt, fd, "link", &l);
   505					struct fdbox_fd put_fd = {
   506						.flags = 0,
   507						.fd = -1,
   508					};
   509					struct box_fd *box_fd;
   510	
   511					strncpy(put_fd.name, fdt_get_name(fdt, fd, NULL), sizeof(put_fd.name) - 1);
   512	
   513					if (!link || l != sizeof(ulong))
   514						continue;
   515					dangle = find_dangle(*link);
   516					box_fd = fdbox_put_file(new_box, &put_fd, dangle->file);
   517					if (!box_fd)
   518						continue;
   519					list_del(&dangle->next);
   520				} else {
   521					char p[256] = "";
   522					fdt_get_path(fdt, fd, p, sizeof(p) - 1);
   523					pr_warn("Node '%s' has invalid compatible", p);
   524				}
   525			}
   526		}
   527	}
   528	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-05-04 19:59 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=202405050321.MKZxcasf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=graf@amazon.com \
    --cc=kvm-ppc@vger.kernel.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).