[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006111819.2aG1SMWK%lkp@intel.com>
Date: Thu, 11 Jun 2020 18:48:29 +0800
From: kernel test robot <lkp@...el.com>
To: Herbert Xu <herbert@...dor.apana.org.au>,
Alexander Viro <viro@...iv.linux.org.uk>,
Sagi Grimberg <sagi@...htbitslabs.com>,
Christoph Hellwig <hch@....de>,
"David S. Miller" <davem@...emloft.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH] iov_iter: Move unnecessary inclusion of crypto/hash.h
Hi Herbert,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Herbert-Xu/iov_iter-Move-unnecessary-inclusion-of-crypto-hash-h/20200611-154742
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/soc/qcom/pdr_interface.c: In function 'pdr_indack_work':
>> drivers/soc/qcom/pdr_interface.c:292:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
292 | kfree(ind);
| ^~~~~
drivers/soc/qcom/pdr_interface.c: In function 'pdr_indication_cb':
>> drivers/soc/qcom/pdr_interface.c:328:8: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
328 | ind = kzalloc(sizeof(*ind), GFP_KERNEL);
| ^~~~~~~
>> drivers/soc/qcom/pdr_interface.c:328:6: warning: assignment to 'struct pdr_list_node *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
328 | ind = kzalloc(sizeof(*ind), GFP_KERNEL);
| ^
drivers/soc/qcom/pdr_interface.c: In function 'pdr_locate_service':
>> drivers/soc/qcom/pdr_interface.c:401:7: warning: assignment to 'struct servreg_get_domain_list_resp *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
401 | resp = kzalloc(sizeof(*resp), GFP_KERNEL);
| ^
drivers/soc/qcom/pdr_interface.c: In function 'pdr_add_lookup':
>> drivers/soc/qcom/pdr_interface.c:526:6: warning: assignment to 'struct pdr_service *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
526 | pds = kzalloc(sizeof(*pds), GFP_KERNEL);
| ^
drivers/soc/qcom/pdr_interface.c: In function 'pdr_handle_alloc':
>> drivers/soc/qcom/pdr_interface.c:656:6: warning: assignment to 'struct pdr_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
656 | pdr = kzalloc(sizeof(*pdr), GFP_KERNEL);
| ^
cc1: some warnings being treated as errors
vim +/kfree +292 drivers/soc/qcom/pdr_interface.c
fbe639b44a8275 Sibi Sankar 2020-03-12 271
fbe639b44a8275 Sibi Sankar 2020-03-12 272 static void pdr_indack_work(struct work_struct *work)
fbe639b44a8275 Sibi Sankar 2020-03-12 273 {
fbe639b44a8275 Sibi Sankar 2020-03-12 274 struct pdr_handle *pdr = container_of(work, struct pdr_handle,
fbe639b44a8275 Sibi Sankar 2020-03-12 275 indack_work);
fbe639b44a8275 Sibi Sankar 2020-03-12 276 struct pdr_list_node *ind, *tmp;
fbe639b44a8275 Sibi Sankar 2020-03-12 277 struct pdr_service *pds;
fbe639b44a8275 Sibi Sankar 2020-03-12 278
fbe639b44a8275 Sibi Sankar 2020-03-12 279 list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
fbe639b44a8275 Sibi Sankar 2020-03-12 280 pds = ind->pds;
fbe639b44a8275 Sibi Sankar 2020-03-12 281 pdr_send_indack_msg(pdr, pds, ind->transaction_id);
fbe639b44a8275 Sibi Sankar 2020-03-12 282
fbe639b44a8275 Sibi Sankar 2020-03-12 283 mutex_lock(&pdr->status_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 284 pds->state = ind->curr_state;
fbe639b44a8275 Sibi Sankar 2020-03-12 285 pdr->status(pds->state, pds->service_path, pdr->priv);
fbe639b44a8275 Sibi Sankar 2020-03-12 286 mutex_unlock(&pdr->status_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 287
fbe639b44a8275 Sibi Sankar 2020-03-12 288 mutex_lock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 289 list_del(&ind->node);
fbe639b44a8275 Sibi Sankar 2020-03-12 290 mutex_unlock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 291
fbe639b44a8275 Sibi Sankar 2020-03-12 @292 kfree(ind);
fbe639b44a8275 Sibi Sankar 2020-03-12 293 }
fbe639b44a8275 Sibi Sankar 2020-03-12 294 }
fbe639b44a8275 Sibi Sankar 2020-03-12 295
fbe639b44a8275 Sibi Sankar 2020-03-12 296 static void pdr_indication_cb(struct qmi_handle *qmi,
fbe639b44a8275 Sibi Sankar 2020-03-12 297 struct sockaddr_qrtr *sq,
fbe639b44a8275 Sibi Sankar 2020-03-12 298 struct qmi_txn *txn, const void *data)
fbe639b44a8275 Sibi Sankar 2020-03-12 299 {
fbe639b44a8275 Sibi Sankar 2020-03-12 300 struct pdr_handle *pdr = container_of(qmi, struct pdr_handle,
fbe639b44a8275 Sibi Sankar 2020-03-12 301 notifier_hdl);
fbe639b44a8275 Sibi Sankar 2020-03-12 302 const struct servreg_state_updated_ind *ind_msg = data;
fbe639b44a8275 Sibi Sankar 2020-03-12 303 struct pdr_list_node *ind;
fbe639b44a8275 Sibi Sankar 2020-03-12 304 struct pdr_service *pds;
e69b3bede1b2f7 Nathan Chancellor 2020-03-16 305 bool found = false;
fbe639b44a8275 Sibi Sankar 2020-03-12 306
fbe639b44a8275 Sibi Sankar 2020-03-12 307 if (!ind_msg || !ind_msg->service_path[0] ||
fbe639b44a8275 Sibi Sankar 2020-03-12 308 strlen(ind_msg->service_path) > SERVREG_NAME_LENGTH)
fbe639b44a8275 Sibi Sankar 2020-03-12 309 return;
fbe639b44a8275 Sibi Sankar 2020-03-12 310
fbe639b44a8275 Sibi Sankar 2020-03-12 311 mutex_lock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 312 list_for_each_entry(pds, &pdr->lookups, node) {
fbe639b44a8275 Sibi Sankar 2020-03-12 313 if (strcmp(pds->service_path, ind_msg->service_path))
fbe639b44a8275 Sibi Sankar 2020-03-12 314 continue;
fbe639b44a8275 Sibi Sankar 2020-03-12 315
fbe639b44a8275 Sibi Sankar 2020-03-12 316 found = true;
fbe639b44a8275 Sibi Sankar 2020-03-12 317 break;
fbe639b44a8275 Sibi Sankar 2020-03-12 318 }
fbe639b44a8275 Sibi Sankar 2020-03-12 319 mutex_unlock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 320
fbe639b44a8275 Sibi Sankar 2020-03-12 321 if (!found)
fbe639b44a8275 Sibi Sankar 2020-03-12 322 return;
fbe639b44a8275 Sibi Sankar 2020-03-12 323
fbe639b44a8275 Sibi Sankar 2020-03-12 324 pr_info("PDR: Indication received from %s, state: 0x%x, trans-id: %d\n",
fbe639b44a8275 Sibi Sankar 2020-03-12 325 ind_msg->service_path, ind_msg->curr_state,
fbe639b44a8275 Sibi Sankar 2020-03-12 326 ind_msg->transaction_id);
fbe639b44a8275 Sibi Sankar 2020-03-12 327
fbe639b44a8275 Sibi Sankar 2020-03-12 @328 ind = kzalloc(sizeof(*ind), GFP_KERNEL);
fbe639b44a8275 Sibi Sankar 2020-03-12 329 if (!ind)
fbe639b44a8275 Sibi Sankar 2020-03-12 330 return;
fbe639b44a8275 Sibi Sankar 2020-03-12 331
fbe639b44a8275 Sibi Sankar 2020-03-12 332 ind->transaction_id = ind_msg->transaction_id;
fbe639b44a8275 Sibi Sankar 2020-03-12 333 ind->curr_state = ind_msg->curr_state;
fbe639b44a8275 Sibi Sankar 2020-03-12 334 ind->pds = pds;
fbe639b44a8275 Sibi Sankar 2020-03-12 335
fbe639b44a8275 Sibi Sankar 2020-03-12 336 mutex_lock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 337 list_add_tail(&ind->node, &pdr->indack_list);
fbe639b44a8275 Sibi Sankar 2020-03-12 338 mutex_unlock(&pdr->list_lock);
fbe639b44a8275 Sibi Sankar 2020-03-12 339
fbe639b44a8275 Sibi Sankar 2020-03-12 340 queue_work(pdr->indack_wq, &pdr->indack_work);
fbe639b44a8275 Sibi Sankar 2020-03-12 341 }
fbe639b44a8275 Sibi Sankar 2020-03-12 342
fbe639b44a8275 Sibi Sankar 2020-03-12 343 static struct qmi_msg_handler qmi_indication_handler[] = {
fbe639b44a8275 Sibi Sankar 2020-03-12 344 {
fbe639b44a8275 Sibi Sankar 2020-03-12 345 .type = QMI_INDICATION,
fbe639b44a8275 Sibi Sankar 2020-03-12 346 .msg_id = SERVREG_STATE_UPDATED_IND_ID,
fbe639b44a8275 Sibi Sankar 2020-03-12 347 .ei = servreg_state_updated_ind_ei,
fbe639b44a8275 Sibi Sankar 2020-03-12 348 .decoded_size = sizeof(struct servreg_state_updated_ind),
fbe639b44a8275 Sibi Sankar 2020-03-12 349 .fn = pdr_indication_cb,
fbe639b44a8275 Sibi Sankar 2020-03-12 350 },
fbe639b44a8275 Sibi Sankar 2020-03-12 351 {}
fbe639b44a8275 Sibi Sankar 2020-03-12 352 };
fbe639b44a8275 Sibi Sankar 2020-03-12 353
fbe639b44a8275 Sibi Sankar 2020-03-12 354 static int pdr_get_domain_list(struct servreg_get_domain_list_req *req,
fbe639b44a8275 Sibi Sankar 2020-03-12 355 struct servreg_get_domain_list_resp *resp,
fbe639b44a8275 Sibi Sankar 2020-03-12 356 struct pdr_handle *pdr)
fbe639b44a8275 Sibi Sankar 2020-03-12 357 {
fbe639b44a8275 Sibi Sankar 2020-03-12 358 struct qmi_txn txn;
fbe639b44a8275 Sibi Sankar 2020-03-12 359 int ret;
fbe639b44a8275 Sibi Sankar 2020-03-12 360
fbe639b44a8275 Sibi Sankar 2020-03-12 361 ret = qmi_txn_init(&pdr->locator_hdl, &txn,
fbe639b44a8275 Sibi Sankar 2020-03-12 362 servreg_get_domain_list_resp_ei, resp);
fbe639b44a8275 Sibi Sankar 2020-03-12 363 if (ret < 0)
fbe639b44a8275 Sibi Sankar 2020-03-12 364 return ret;
fbe639b44a8275 Sibi Sankar 2020-03-12 365
fbe639b44a8275 Sibi Sankar 2020-03-12 366 ret = qmi_send_request(&pdr->locator_hdl,
fbe639b44a8275 Sibi Sankar 2020-03-12 367 &pdr->locator_addr,
fbe639b44a8275 Sibi Sankar 2020-03-12 368 &txn, SERVREG_GET_DOMAIN_LIST_REQ,
fbe639b44a8275 Sibi Sankar 2020-03-12 369 SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN,
fbe639b44a8275 Sibi Sankar 2020-03-12 370 servreg_get_domain_list_req_ei,
fbe639b44a8275 Sibi Sankar 2020-03-12 371 req);
fbe639b44a8275 Sibi Sankar 2020-03-12 372 if (ret < 0) {
fbe639b44a8275 Sibi Sankar 2020-03-12 373 qmi_txn_cancel(&txn);
fbe639b44a8275 Sibi Sankar 2020-03-12 374 return ret;
fbe639b44a8275 Sibi Sankar 2020-03-12 375 }
fbe639b44a8275 Sibi Sankar 2020-03-12 376
fbe639b44a8275 Sibi Sankar 2020-03-12 377 ret = qmi_txn_wait(&txn, 5 * HZ);
fbe639b44a8275 Sibi Sankar 2020-03-12 378 if (ret < 0) {
fbe639b44a8275 Sibi Sankar 2020-03-12 379 pr_err("PDR: %s get domain list txn wait failed: %d\n",
fbe639b44a8275 Sibi Sankar 2020-03-12 380 req->service_name, ret);
fbe639b44a8275 Sibi Sankar 2020-03-12 381 return ret;
fbe639b44a8275 Sibi Sankar 2020-03-12 382 }
fbe639b44a8275 Sibi Sankar 2020-03-12 383
fbe639b44a8275 Sibi Sankar 2020-03-12 384 if (resp->resp.result != QMI_RESULT_SUCCESS_V01) {
fbe639b44a8275 Sibi Sankar 2020-03-12 385 pr_err("PDR: %s get domain list failed: 0x%x\n",
fbe639b44a8275 Sibi Sankar 2020-03-12 386 req->service_name, resp->resp.error);
fbe639b44a8275 Sibi Sankar 2020-03-12 387 return -EREMOTEIO;
fbe639b44a8275 Sibi Sankar 2020-03-12 388 }
fbe639b44a8275 Sibi Sankar 2020-03-12 389
fbe639b44a8275 Sibi Sankar 2020-03-12 390 return 0;
fbe639b44a8275 Sibi Sankar 2020-03-12 391 }
fbe639b44a8275 Sibi Sankar 2020-03-12 392
fbe639b44a8275 Sibi Sankar 2020-03-12 393 static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)
fbe639b44a8275 Sibi Sankar 2020-03-12 394 {
fbe639b44a8275 Sibi Sankar 2020-03-12 395 struct servreg_get_domain_list_resp *resp;
fbe639b44a8275 Sibi Sankar 2020-03-12 396 struct servreg_get_domain_list_req req;
fbe639b44a8275 Sibi Sankar 2020-03-12 397 struct servreg_location_entry *entry;
fbe639b44a8275 Sibi Sankar 2020-03-12 398 int domains_read = 0;
fbe639b44a8275 Sibi Sankar 2020-03-12 399 int ret, i;
fbe639b44a8275 Sibi Sankar 2020-03-12 400
fbe639b44a8275 Sibi Sankar 2020-03-12 @401 resp = kzalloc(sizeof(*resp), GFP_KERNEL);
fbe639b44a8275 Sibi Sankar 2020-03-12 402 if (!resp)
fbe639b44a8275 Sibi Sankar 2020-03-12 403 return -ENOMEM;
fbe639b44a8275 Sibi Sankar 2020-03-12 404
fbe639b44a8275 Sibi Sankar 2020-03-12 405 /* Prepare req message */
fbe639b44a8275 Sibi Sankar 2020-03-12 406 strcpy(req.service_name, pds->service_name);
fbe639b44a8275 Sibi Sankar 2020-03-12 407 req.domain_offset_valid = true;
fbe639b44a8275 Sibi Sankar 2020-03-12 408 req.domain_offset = 0;
fbe639b44a8275 Sibi Sankar 2020-03-12 409
fbe639b44a8275 Sibi Sankar 2020-03-12 410 do {
fbe639b44a8275 Sibi Sankar 2020-03-12 411 req.domain_offset = domains_read;
fbe639b44a8275 Sibi Sankar 2020-03-12 412 ret = pdr_get_domain_list(&req, resp, pdr);
fbe639b44a8275 Sibi Sankar 2020-03-12 413 if (ret < 0)
fbe639b44a8275 Sibi Sankar 2020-03-12 414 goto out;
fbe639b44a8275 Sibi Sankar 2020-03-12 415
fbe639b44a8275 Sibi Sankar 2020-03-12 416 for (i = domains_read; i < resp->domain_list_len; i++) {
fbe639b44a8275 Sibi Sankar 2020-03-12 417 entry = &resp->domain_list[i];
fbe639b44a8275 Sibi Sankar 2020-03-12 418
fbe639b44a8275 Sibi Sankar 2020-03-12 419 if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name))
fbe639b44a8275 Sibi Sankar 2020-03-12 420 continue;
fbe639b44a8275 Sibi Sankar 2020-03-12 421
fbe639b44a8275 Sibi Sankar 2020-03-12 422 if (!strcmp(entry->name, pds->service_path)) {
fbe639b44a8275 Sibi Sankar 2020-03-12 423 pds->service_data_valid = entry->service_data_valid;
fbe639b44a8275 Sibi Sankar 2020-03-12 424 pds->service_data = entry->service_data;
fbe639b44a8275 Sibi Sankar 2020-03-12 425 pds->instance = entry->instance;
fbe639b44a8275 Sibi Sankar 2020-03-12 426 goto out;
fbe639b44a8275 Sibi Sankar 2020-03-12 427 }
fbe639b44a8275 Sibi Sankar 2020-03-12 428 }
fbe639b44a8275 Sibi Sankar 2020-03-12 429
fbe639b44a8275 Sibi Sankar 2020-03-12 430 /* Update ret to indicate that the service is not yet found */
fbe639b44a8275 Sibi Sankar 2020-03-12 431 ret = -ENXIO;
fbe639b44a8275 Sibi Sankar 2020-03-12 432
fbe639b44a8275 Sibi Sankar 2020-03-12 433 /* Always read total_domains from the response msg */
fbe639b44a8275 Sibi Sankar 2020-03-12 434 if (resp->domain_list_len > resp->total_domains)
fbe639b44a8275 Sibi Sankar 2020-03-12 435 resp->domain_list_len = resp->total_domains;
fbe639b44a8275 Sibi Sankar 2020-03-12 436
fbe639b44a8275 Sibi Sankar 2020-03-12 437 domains_read += resp->domain_list_len;
fbe639b44a8275 Sibi Sankar 2020-03-12 438 } while (domains_read < resp->total_domains);
fbe639b44a8275 Sibi Sankar 2020-03-12 439 out:
fbe639b44a8275 Sibi Sankar 2020-03-12 440 kfree(resp);
fbe639b44a8275 Sibi Sankar 2020-03-12 441 return ret;
fbe639b44a8275 Sibi Sankar 2020-03-12 442 }
fbe639b44a8275 Sibi Sankar 2020-03-12 443
:::::: The code at line 292 was first introduced by commit
:::::: fbe639b44a82755d639df1c5d147c93f02ac5a0f soc: qcom: Introduce Protection Domain Restart helpers
:::::: TO: Sibi Sankar <sibis@...eaurora.org>
:::::: CC: Bjorn Andersson <bjorn.andersson@...aro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (53390 bytes)
Powered by blists - more mailing lists