Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Graf <graf@amazon.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Mike Rapoport <rppt@kernel.org>
Subject: [rppt:kho/v4 12/13] arch/x86/kernel/kexec-bzimage64.c:344:10: error: invalid application of 'sizeof' to an incomplete type 'struct kho_data'
Date: Tue, 4 Feb 2025 21:45:36 +0800	[thread overview]
Message-ID: <202502042150.OfBc2oL8-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git kho/v4
head:   a75b813f58b0bc19b2c4b06bd62afc87f02dcb43
commit: dd730ee646a9855c98bf5e8ed8ccf1ee7c8fe122 [12/13] x86: Add KHO support
config: x86_64-buildonly-randconfig-005-20250204 (https://download.01.org/0day-ci/archive/20250204/202502042150.OfBc2oL8-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250204/202502042150.OfBc2oL8-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/202502042150.OfBc2oL8-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kernel/kexec-bzimage64.c:344:10: error: invalid application of 'sizeof' to an incomplete type 'struct kho_data'
     344 |                                      sizeof(struct kho_data);
         |                                      ^     ~~~~~~~~~~~~~~~~~
   arch/x86/kernel/kexec-bzimage64.c:344:24: note: forward declaration of 'struct kho_data'
     344 |                                      sizeof(struct kho_data);
         |                                                    ^
   arch/x86/kernel/kexec-bzimage64.c:516:10: error: invalid application of 'sizeof' to an incomplete type 'struct kho_data'
     516 |                               sizeof(struct kho_data);
         |                               ^     ~~~~~~~~~~~~~~~~~
   arch/x86/kernel/kexec-bzimage64.c:516:24: note: forward declaration of 'struct kho_data'
     516 |                               sizeof(struct kho_data);
         |                                             ^
   2 errors generated.


vim +344 arch/x86/kernel/kexec-bzimage64.c

   331	
   332		if (IS_ENABLED(CONFIG_IMA_KEXEC)) {
   333			/* Setup IMA log buffer state */
   334			setup_ima_state(image, params, params_load_addr,
   335					setup_data_offset);
   336			setup_data_offset += sizeof(struct setup_data) +
   337					     sizeof(struct ima_setup_data);
   338		}
   339	
   340		if (IS_ENABLED(CONFIG_KEXEC_HANDOVER)) {
   341			/* Setup space to store preservation metadata */
   342			setup_kho(image, params, params_load_addr, setup_data_offset);
   343			setup_data_offset += sizeof(struct setup_data) +
 > 344					     sizeof(struct kho_data);
   345		}
   346	
   347		/* Setup RNG seed */
   348		setup_rng_seed(params, params_load_addr, setup_data_offset);
   349	
   350		/* Setup EDD info */
   351		memcpy(params->eddbuf, boot_params.eddbuf,
   352					EDDMAXNR * sizeof(struct edd_info));
   353		params->eddbuf_entries = boot_params.eddbuf_entries;
   354	
   355		memcpy(params->edd_mbr_sig_buffer, boot_params.edd_mbr_sig_buffer,
   356		       EDD_MBR_SIG_MAX * sizeof(unsigned int));
   357	
   358		return ret;
   359	}
   360	

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

                 reply	other threads:[~2025-02-04 13: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=202502042150.OfBc2oL8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=graf@amazon.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rppt@kernel.org \
    /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