linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pm:bleeding-edge 102/106] drivers/acpi/prmt.c:109:60: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
@ 2021-06-09 19:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-09 19:07 UTC (permalink / raw)
  To: Erik Kaneda; +Cc: kbuild-all, linux-acpi, devel, linux-pm, Rafael J. Wysocki

[-- Attachment #1: Type: text/plain, Size: 6235 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   30ef794b1526be9fa11fd41725dc0032d1018956
commit: f06e8901662d5c5c80f47d1cef6207688ee42e81 [102/106] ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=f06e8901662d5c5c80f47d1cef6207688ee42e81
        git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
        git fetch --no-tags pm bleeding-edge
        git checkout f06e8901662d5c5c80f47d1cef6207688ee42e81
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/acpi/prmt.c:19:
   include/linux/acpi.h:135:33: error: field 'prmt' has incomplete type
     135 |  struct acpi_prmt_module_header prmt;
         |                                 ^~~~
   In file included from include/linux/device.h:29,
                    from include/linux/rtc.h:37,
                    from include/linux/efi.h:20,
                    from drivers/acpi/prmt.c:18:
   drivers/acpi/prmt.c: In function 'acpi_parse_prmt':
>> drivers/acpi/prmt.c:109:60: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
     109 |  module_info_size = struct_size(tm, handlers, module_info->handler_count);
         |                                                            ^~~~~~~~~~~~~
   include/linux/overflow.h:325:14: note: in definition of macro 'struct_size'
     325 |  __ab_c_size(count,      \
         |              ^~~~~
>> drivers/acpi/prmt.c:112:45: error: 'struct acpi_prmt_module_info' has no member named 'guid'
     112 |  guid_copy(&tm->guid, (guid_t *) module_info->guid);
         |                                             ^~
   drivers/acpi/prmt.c:115:35: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
     115 |  tm->handler_count = module_info->handler_count;
         |                                   ^~~~~~~~~~~~~
         |                                   handler_info_count
>> drivers/acpi/prmt.c:92:84: error: 'struct acpi_prmt_module_info' has no member named 'handler_offset'; did you mean 'handler_info_offset'?
      92 | #define get_first_handler(a) ((struct acpi_prmt_handler_info *) ((char *) (a) + a->handler_offset))
         |                                                                                    ^~~~~~~~~~~~~~
   drivers/acpi/prmt.c:137:17: note: in expansion of macro 'get_first_handler'
     137 |  handler_info = get_first_handler(module_info);
         |                 ^~~~~~~~~~~~~~~~~
>> drivers/acpi/prmt.c:141:46: error: 'struct acpi_prmt_handler_info' has no member named 'guid'
     141 |   guid_copy(&th->guid, (guid_t *)handler_info->guid);
         |                                              ^~
>> drivers/acpi/prmt.c:142:51: error: 'struct acpi_prmt_handler_info' has no member named 'address'
     142 |   th->handler_addr = efi_pa_va_lookup(handler_info->address);
         |                                                   ^~


vim +109 drivers/acpi/prmt.c

    90	
    91	
  > 92	#define get_first_handler(a) ((struct acpi_prmt_handler_info *) ((char *) (a) + a->handler_offset))
    93	#define get_next_handler(a) ((struct acpi_prmt_handler_info *) (sizeof(struct acpi_prmt_handler_info) + (char *) a))
    94	
    95	static int __init
    96	acpi_parse_prmt(union acpi_subtable_headers *header, const unsigned long end)
    97	{
    98		struct acpi_prmt_module_info *module_info;
    99		struct acpi_prmt_handler_info *handler_info;
   100		struct prm_handler_info *th;
   101		struct prm_module_info *tm;
   102		u64 mmio_count = 0;
   103		u64 cur_handler = 0;
   104		u32 module_info_size = 0;
   105		u64 mmio_range_size = 0;
   106		void *temp_mmio;
   107	
   108		module_info = (struct acpi_prmt_module_info *) header;
 > 109		module_info_size = struct_size(tm, handlers, module_info->handler_count);
   110		tm = kmalloc(module_info_size, GFP_KERNEL);
   111	
 > 112		guid_copy(&tm->guid, (guid_t *) module_info->guid);
   113		tm->major_rev = module_info->major_rev;
   114		tm->minor_rev = module_info->minor_rev;
   115		tm->handler_count = module_info->handler_count;
   116		tm->updatable = true;
   117	
   118		if (module_info->mmio_list_pointer) {
   119			/*
   120			 * Each module is associated with a list of addr
   121			 * ranges that it can use during the service
   122			 */
   123			mmio_count = *(u64 *) memremap(module_info->mmio_list_pointer, 8, MEMREMAP_WB);
   124			mmio_range_size = struct_size(tm->mmio_info, addr_ranges, mmio_count);
   125			tm->mmio_info = kmalloc(mmio_range_size, GFP_KERNEL);
   126			temp_mmio = memremap(module_info->mmio_list_pointer, mmio_range_size, MEMREMAP_WB);
   127			memmove(tm->mmio_info, temp_mmio, mmio_range_size);
   128		} else {
   129			mmio_range_size = struct_size(tm->mmio_info, addr_ranges, mmio_count);
   130			tm->mmio_info = kmalloc(mmio_range_size, GFP_KERNEL);
   131			tm->mmio_info->mmio_count = 0;
   132		}
   133	
   134		INIT_LIST_HEAD(&tm->module_list);
   135		list_add(&tm->module_list, &prm_module_list);
   136	
   137		handler_info = get_first_handler(module_info);
   138		do {
   139			th = &tm->handlers[cur_handler];
   140	
 > 141			guid_copy(&th->guid, (guid_t *)handler_info->guid);
 > 142			th->handler_addr = efi_pa_va_lookup(handler_info->address);
   143			th->static_data_buffer_addr = efi_pa_va_lookup(handler_info->static_data_buffer_address);
   144			th->acpi_param_buffer_addr = efi_pa_va_lookup(handler_info->acpi_param_buffer_address);
   145		} while (++cur_handler < tm->handler_count && (handler_info = get_next_handler(handler_info)));
   146	
   147		return 0;
   148	}
   149	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66035 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09 19:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 19:07 [pm:bleeding-edge 102/106] drivers/acpi/prmt.c:109:60: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'? kernel test robot

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 NNTP newsgroup(s).