Re: [PATCH] ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sudeep,

I love your patch! Yet something to improve:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linux/master linus/master v5.16-rc6 next-20211222]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sudeep-Holla/ACPI-PCC-Implement-OperationRegion-handler-for-the-PCC-Type-3-subtype/20211223-030953
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arm64-randconfig-r034-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230517.xGNBVseT-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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://github.com/0day-ci/linux/commit/d47183476e4a00211d39cd175b92fe5c11fbb65a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sudeep-Holla/ACPI-PCC-Implement-OperationRegion-handler-for-the-PCC-Type-3-subtype/20211223-030953
        git checkout d47183476e4a00211d39cd175b92fe5c11fbb65a
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/

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

All errors (new ones prefixed by >>):

>> drivers/acpi/pcc_opregion.c:22:30: error: field 'ctx' has incomplete type
      22 |         struct acpi_pcc_info ctx;
         |                              ^~~
   In file included from include/acpi/acpi.h:29,
                    from include/linux/acpi.h:22,
                    from drivers/acpi/pcc_opregion.c:10:
   drivers/acpi/pcc_opregion.c: In function 'acpi_pcc_opregion_setup':
>> include/acpi/acoutput.h:398:26: error: implicit declaration of function 'acpi_ut_status_exit'; did you mean 'acpi_irq_stats_init'? [-Werror=implicit-function-declaration]
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |                          ^~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:44:17: note: in expansion of macro 'return_ACPI_STATUS'
      44 |                 return_ACPI_STATUS(AE_NO_MEMORY);
         |                 ^~~~~~~~~~~~~~~~~~
>> include/acpi/acoutput.h:258:43: error: '_acpi_module_name' undeclared (first use in this function); did you mean 'quota_module_name'?
     258 |         __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
         |                                           ^~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:375:27: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
     375 |                 function (ACPI_DEBUG_PARAMETERS, _param); \
         |                           ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:44:17: note: in expansion of macro 'return_ACPI_STATUS'
      44 |                 return_ACPI_STATUS(AE_NO_MEMORY);
         |                 ^~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:258:43: note: each undeclared identifier is reported only once for each function it appears in
     258 |         __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
         |                                           ^~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:375:27: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
     375 |                 function (ACPI_DEBUG_PARAMETERS, _param); \
         |                           ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:44:17: note: in expansion of macro 'return_ACPI_STATUS'
      44 |                 return_ACPI_STATUS(AE_NO_MEMORY);
         |                 ^~~~~~~~~~~~~~~~~~
>> include/acpi/acoutput.h:258:62: error: '_COMPONENT' undeclared (first use in this function)
     258 |         __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
         |                                                              ^~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:375:27: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
     375 |                 function (ACPI_DEBUG_PARAMETERS, _param); \
         |                           ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:44:17: note: in expansion of macro 'return_ACPI_STATUS'
      44 |                 return_ACPI_STATUS(AE_NO_MEMORY);
         |                 ^~~~~~~~~~~~~~~~~~
>> drivers/acpi/pcc_opregion.c:48:31: error: invalid use of undefined type 'struct acpi_pcc_info'
      48 |         data->ctx.length = ctx->length;
         |                               ^~
   drivers/acpi/pcc_opregion.c:49:36: error: invalid use of undefined type 'struct acpi_pcc_info'
      49 |         data->ctx.subspace_id = ctx->subspace_id;
         |                                    ^~
   drivers/acpi/pcc_opregion.c:50:40: error: invalid use of undefined type 'struct acpi_pcc_info'
      50 |         data->ctx.internal_buffer = ctx->internal_buffer;
         |                                        ^~
   drivers/acpi/pcc_opregion.c:53:65: error: invalid use of undefined type 'struct acpi_pcc_info'
      53 |         data->pcc_chan = pcc_mbox_request_channel(&data->cl, ctx->subspace_id);
         |                                                                 ^~
   In file included from include/linux/kernel.h:20,
                    from drivers/acpi/pcc_opregion.c:9:
   drivers/acpi/pcc_opregion.c:56:27: error: invalid use of undefined type 'struct acpi_pcc_info'
      56 |                        ctx->subspace_id);
         |                           ^~
   include/linux/printk.h:422:33: note: in definition of macro 'printk_index_wrap'
     422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:493:9: note: in expansion of macro 'printk'
     493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/acpi/pcc_opregion.c:55:17: note: in expansion of macro 'pr_err'
      55 |                 pr_err("Failed to find PCC channel for subspace %d\n",
         |                 ^~~~~~
   drivers/acpi/pcc_opregion.c:65:27: error: invalid use of undefined type 'struct acpi_pcc_info'
      65 |                        ctx->subspace_id);
         |                           ^~
   include/linux/printk.h:422:33: note: in definition of macro 'printk_index_wrap'
     422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:493:9: note: in expansion of macro 'printk'
     493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/acpi/pcc_opregion.c:64:17: note: in expansion of macro 'pr_err'
      64 |                 pr_err("Failed to ioremap PCC comm region mem for %d\n",
         |                 ^~~~~~
   In file included from include/acpi/acpi.h:29,
                    from include/linux/acpi.h:22,
                    from drivers/acpi/pcc_opregion.c:10:
   drivers/acpi/pcc_opregion.c: In function 'acpi_pcc_opregion_space_handler':
>> include/acpi/acoutput.h:258:43: error: '_acpi_module_name' undeclared (first use in this function); did you mean 'quota_module_name'?
     258 |         __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
         |                                           ^~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:375:27: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
     375 |                 function (ACPI_DEBUG_PARAMETERS, _param); \
         |                           ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:88:17: note: in expansion of macro 'return_ACPI_STATUS'
      88 |                 return_ACPI_STATUS(AE_ERROR);
         |                 ^~~~~~~~~~~~~~~~~~
>> include/acpi/acoutput.h:258:62: error: '_COMPONENT' undeclared (first use in this function)
     258 |         __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
         |                                                              ^~~~~~~~~~
   include/acpi/acoutput.h:281:44: note: in definition of macro 'ACPI_DO_WHILE0'
     281 | #define ACPI_DO_WHILE0(a)               do a while(0)
         |                                            ^
   include/acpi/acoutput.h:375:27: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
     375 |                 function (ACPI_DEBUG_PARAMETERS, _param); \
         |                           ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:398:9: note: in expansion of macro 'ACPI_TRACE_EXIT'
     398 |         ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status)
         |         ^~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c:88:17: note: in expansion of macro 'return_ACPI_STATUS'
      88 |                 return_ACPI_STATUS(AE_ERROR);
         |                 ^~~~~~~~~~~~~~~~~~
   drivers/acpi/pcc_opregion.c: At top level:
>> drivers/acpi/pcc_opregion.c:25:22: error: storage size of 'pcc_ctx' isn't known
      25 | struct acpi_pcc_info pcc_ctx;
         |                      ^~~~~~~
   cc1: some warnings being treated as errors


vim +/ctx +22 drivers/acpi/pcc_opregion.c

    16	
    17	struct pcc_data {
    18		struct pcc_mbox_chan *pcc_chan;
    19		void __iomem *pcc_comm_addr;
    20		struct completion done;
    21	        struct mbox_client cl;
  > 22		struct acpi_pcc_info ctx;
    23	};
    24	
  > 25	struct acpi_pcc_info pcc_ctx;
    26	
    27	static void pcc_rx_callback(struct mbox_client *cl, void *m)
    28	{
    29	        struct pcc_data *data = container_of(cl, struct pcc_data, cl);
    30	
    31		complete(&data->done);
    32	}
    33	
    34	static acpi_status
    35	acpi_pcc_opregion_setup(acpi_handle region_handle, u32 function,
    36				void *handler_context,  void **region_context)
    37	{
    38		struct pcc_data *data;
    39		struct acpi_pcc_info *ctx = handler_context;
    40		struct pcc_mbox_chan *pcc_chan;
    41	
    42		data = kzalloc(sizeof(*data), GFP_KERNEL);
    43		if (!data)
    44			return_ACPI_STATUS(AE_NO_MEMORY);
    45	
    46		data->cl.rx_callback = pcc_rx_callback;
    47		data->cl.knows_txdone = true;
  > 48		data->ctx.length = ctx->length;
    49		data->ctx.subspace_id = ctx->subspace_id;
    50		data->ctx.internal_buffer = ctx->internal_buffer;
    51	
    52		init_completion(&data->done);
    53		data->pcc_chan = pcc_mbox_request_channel(&data->cl, ctx->subspace_id);
    54		if (IS_ERR(data->pcc_chan)) {
    55			pr_err("Failed to find PCC channel for subspace %d\n",
    56			       ctx->subspace_id);
    57			return_ACPI_STATUS(AE_NOT_FOUND);
    58		}
    59	
    60		pcc_chan = data->pcc_chan;
    61		data->pcc_comm_addr = acpi_os_ioremap(pcc_chan->shmem_base_addr,
    62						      pcc_chan->shmem_size);
    63		if (!data->pcc_comm_addr) {
    64			pr_err("Failed to ioremap PCC comm region mem for %d\n",
    65			       ctx->subspace_id);
    66			return_ACPI_STATUS(AE_NO_MEMORY);
    67		}
    68	
    69		*region_context = data;
    70		return_ACPI_STATUS(AE_OK);
    71	}
    72	

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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux