lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210061155.jp02UT8a-lkp@intel.com>
Date:   Thu, 6 Oct 2022 11:11:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jeff Johnson <quic_jjohnson@...cinc.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, 0day robot <lkp@...el.com>,
        Alex Elder <elder@...aro.org>,
        Sibi Sankar <quic_sibis@...cinc.com>
Subject: drivers/soc/qcom/pdr_internal.h:192:20: error: initializing 'struct
 qmi_elem_info *' with an expression of type 'const struct qmi_elem_info[5]'
 discards qualifiers

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20221006-045615/Jeff-Johnson/net-ipa-Make-QMI-message-rules-const/20220915-084715
head:   ae4987712d869a752d8172a1c3d48a2d0c16b47b
commit: ae4987712d869a752d8172a1c3d48a2d0c16b47b soc: qcom: pdr: Make QMI message rules const
date:   6 hours ago
config: hexagon-randconfig-r024-20221003
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/intel-lab-lkp/linux/commit/ae4987712d869a752d8172a1c3d48a2d0c16b47b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review UPDATE-20221006-045615/Jeff-Johnson/net-ipa-Make-QMI-message-rules-const/20220915-084715
        git checkout ae4987712d869a752d8172a1c3d48a2d0c16b47b
        # 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=hexagon SHELL=/bin/bash drivers/soc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from drivers/soc/qcom/pdr_interface.c:12:
>> drivers/soc/qcom/pdr_internal.h:192:20: error: initializing 'struct qmi_elem_info *' with an expression of type 'const struct qmi_elem_info[5]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   .ei_array      = servreg_location_entry_ei,
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/soc/qcom/pdr_interface.c:128:7: error: passing 'const struct qmi_elem_info[4]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                              servreg_register_listener_resp_ei,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:268:26: note: passing argument to parameter 'ei' here
                    struct qmi_elem_info *ei, void *c_struct);
                                          ^
   drivers/soc/qcom/pdr_interface.c:139:11: error: passing 'const struct qmi_elem_info[3]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                  servreg_register_listener_req_ei,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:252:27: note: passing argument to parameter 'ei' here
                            struct qmi_elem_info *ei, const void *c_struct);
                                                  ^
   drivers/soc/qcom/pdr_interface.c:254:47: error: passing 'const struct qmi_elem_info[2]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           ret = qmi_txn_init(&pdr->notifier_hdl, &txn, servreg_set_ack_resp_ei,
                                                        ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:268:26: note: passing argument to parameter 'ei' here
                    struct qmi_elem_info *ei, void *c_struct);
                                          ^
   drivers/soc/qcom/pdr_interface.c:265:11: error: passing 'const struct qmi_elem_info[3]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                  servreg_set_ack_req_ei,
                                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:252:27: note: passing argument to parameter 'ei' here
                            struct qmi_elem_info *ei, const void *c_struct);
                                                  ^
>> drivers/soc/qcom/pdr_interface.c:349:9: error: initializing 'struct qmi_elem_info *' with an expression of type 'const struct qmi_elem_info[4]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   .ei = servreg_state_updated_ind_ei,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/soc/qcom/pdr_interface.c:364:7: error: passing 'const struct qmi_elem_info[9]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                              servreg_get_domain_list_resp_ei, resp);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:268:26: note: passing argument to parameter 'ei' here
                    struct qmi_elem_info *ei, void *c_struct);
                                          ^
   drivers/soc/qcom/pdr_interface.c:372:11: error: passing 'const struct qmi_elem_info[4]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                  servreg_get_domain_list_req_ei,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:252:27: note: passing argument to parameter 'ei' here
                            struct qmi_elem_info *ei, const void *c_struct);
                                                  ^
   drivers/soc/qcom/pdr_interface.c:599:7: error: passing 'const struct qmi_elem_info[2]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                              servreg_restart_pd_resp_ei,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:268:26: note: passing argument to parameter 'ei' here
                    struct qmi_elem_info *ei, void *c_struct);
                                          ^
   drivers/soc/qcom/pdr_interface.c:607:11: error: passing 'const struct qmi_elem_info[2]' to parameter of type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                  servreg_restart_pd_req_ei, &req);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/soc/qcom/qmi.h:252:27: note: passing argument to parameter 'ei' here
                            struct qmi_elem_info *ei, const void *c_struct);
                                                  ^
   10 errors generated.


vim +192 drivers/soc/qcom/pdr_internal.h

fbe639b44a8275 Sibi Sankar  2020-03-12  118  
ae4987712d869a Jeff Johnson 2022-10-05  119  static const struct qmi_elem_info servreg_get_domain_list_resp_ei[] = {
fbe639b44a8275 Sibi Sankar  2020-03-12  120  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  121  		.data_type      = QMI_STRUCT,
fbe639b44a8275 Sibi Sankar  2020-03-12  122  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  123  		.elem_size      = sizeof(struct qmi_response_type_v01),
fbe639b44a8275 Sibi Sankar  2020-03-12  124  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  125  		.tlv_type       = 0x02,
fbe639b44a8275 Sibi Sankar  2020-03-12  126  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  127  					   resp),
fbe639b44a8275 Sibi Sankar  2020-03-12  128  		.ei_array      = qmi_response_type_v01_ei,
fbe639b44a8275 Sibi Sankar  2020-03-12  129  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  130  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  131  		.data_type      = QMI_OPT_FLAG,
fbe639b44a8275 Sibi Sankar  2020-03-12  132  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  133  		.elem_size      = sizeof(u8),
fbe639b44a8275 Sibi Sankar  2020-03-12  134  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  135  		.tlv_type       = 0x10,
fbe639b44a8275 Sibi Sankar  2020-03-12  136  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  137  					   total_domains_valid),
fbe639b44a8275 Sibi Sankar  2020-03-12  138  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  139  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  140  		.data_type      = QMI_UNSIGNED_2_BYTE,
fbe639b44a8275 Sibi Sankar  2020-03-12  141  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  142  		.elem_size      = sizeof(u16),
fbe639b44a8275 Sibi Sankar  2020-03-12  143  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  144  		.tlv_type       = 0x10,
fbe639b44a8275 Sibi Sankar  2020-03-12  145  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  146  					   total_domains),
fbe639b44a8275 Sibi Sankar  2020-03-12  147  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  148  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  149  		.data_type      = QMI_OPT_FLAG,
fbe639b44a8275 Sibi Sankar  2020-03-12  150  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  151  		.elem_size      = sizeof(u8),
fbe639b44a8275 Sibi Sankar  2020-03-12  152  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  153  		.tlv_type       = 0x11,
fbe639b44a8275 Sibi Sankar  2020-03-12  154  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  155  					   db_rev_count_valid),
fbe639b44a8275 Sibi Sankar  2020-03-12  156  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  157  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  158  		.data_type      = QMI_UNSIGNED_2_BYTE,
fbe639b44a8275 Sibi Sankar  2020-03-12  159  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  160  		.elem_size      = sizeof(u16),
fbe639b44a8275 Sibi Sankar  2020-03-12  161  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  162  		.tlv_type       = 0x11,
fbe639b44a8275 Sibi Sankar  2020-03-12  163  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  164  					   db_rev_count),
fbe639b44a8275 Sibi Sankar  2020-03-12  165  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  166  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  167  		.data_type      = QMI_OPT_FLAG,
fbe639b44a8275 Sibi Sankar  2020-03-12  168  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  169  		.elem_size      = sizeof(u8),
fbe639b44a8275 Sibi Sankar  2020-03-12  170  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  171  		.tlv_type       = 0x12,
fbe639b44a8275 Sibi Sankar  2020-03-12  172  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  173  					   domain_list_valid),
fbe639b44a8275 Sibi Sankar  2020-03-12  174  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  175  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  176  		.data_type      = QMI_DATA_LEN,
fbe639b44a8275 Sibi Sankar  2020-03-12  177  		.elem_len       = 1,
fbe639b44a8275 Sibi Sankar  2020-03-12  178  		.elem_size      = sizeof(u8),
fbe639b44a8275 Sibi Sankar  2020-03-12  179  		.array_type	= NO_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  180  		.tlv_type       = 0x12,
fbe639b44a8275 Sibi Sankar  2020-03-12  181  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  182  					   domain_list_len),
fbe639b44a8275 Sibi Sankar  2020-03-12  183  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  184  	{
fbe639b44a8275 Sibi Sankar  2020-03-12  185  		.data_type      = QMI_STRUCT,
fbe639b44a8275 Sibi Sankar  2020-03-12  186  		.elem_len       = SERVREG_DOMAIN_LIST_LENGTH,
fbe639b44a8275 Sibi Sankar  2020-03-12  187  		.elem_size      = sizeof(struct servreg_location_entry),
7a366707bb6a93 Sibi Sankar  2020-09-14  188  		.array_type	= VAR_LEN_ARRAY,
fbe639b44a8275 Sibi Sankar  2020-03-12  189  		.tlv_type       = 0x12,
fbe639b44a8275 Sibi Sankar  2020-03-12  190  		.offset         = offsetof(struct servreg_get_domain_list_resp,
fbe639b44a8275 Sibi Sankar  2020-03-12  191  					   domain_list),
fbe639b44a8275 Sibi Sankar  2020-03-12 @192  		.ei_array      = servreg_location_entry_ei,
fbe639b44a8275 Sibi Sankar  2020-03-12  193  	},
fbe639b44a8275 Sibi Sankar  2020-03-12  194  	{}
fbe639b44a8275 Sibi Sankar  2020-03-12  195  };
fbe639b44a8275 Sibi Sankar  2020-03-12  196  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (123511 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ