[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201808141157.dpml3jrW%fengguang.wu@intel.com>
Date: Tue, 14 Aug 2018 11:16:57 +0800
From: kbuild test robot <lkp@...el.com>
To: rkir@...gle.com
Cc: kbuild-all@...org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, tkjos@...gle.com,
Roman Kiryanov <rkir@...gle.com>
Subject: Re: [PATCH 8/9] platform: goldfish: pipe: Replace pr_ with dev_ for
logging
Hi Roman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.18 next-20180813]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/rkir-google-com/platform-goldfish-pipe-Fix-comments-to-fit-80-columns/20180814-104717
config: i386-randconfig-x008-201832 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
drivers/platform//goldfish/goldfish_pipe.c: In function 'goldfish_pipe_read_write':
>> drivers/platform//goldfish/goldfish_pipe.c:405:22: error: 'struct goldfish_pipe_dev' has no member named 'pdev_dev'
pdev_dev = pipe->dev->pdev_dev;
^~
vim +405 drivers/platform//goldfish/goldfish_pipe.c
379
380 static ssize_t goldfish_pipe_read_write(struct file *filp,
381 char __user *buffer, size_t bufflen, int is_write)
382 {
383 struct goldfish_pipe *pipe = filp->private_data;
384 int count = 0, ret = -EINVAL;
385 unsigned long address, address_end, last_page;
386 unsigned int last_page_size;
387 struct device *pdev_dev;
388
389 /* If the emulator already closed the pipe, no need to go further */
390 if (unlikely(test_bit(BIT_CLOSED_ON_HOST, &pipe->flags)))
391 return -EIO;
392 /* Null reads or writes succeeds */
393 if (unlikely(bufflen == 0))
394 return 0;
395 /* Check the buffer range for access */
396 if (unlikely(!access_ok(is_write ? VERIFY_WRITE : VERIFY_READ,
397 buffer, bufflen)))
398 return -EFAULT;
399
400 address = (unsigned long)buffer;
401 address_end = address + bufflen;
402 last_page = (address_end - 1) & PAGE_MASK;
403 last_page_size = ((address_end - 1) & ~PAGE_MASK) + 1;
404
> 405 pdev_dev = pipe->dev->pdev_dev;
406
407 while (address < address_end) {
408 s32 consumed_size;
409 int status;
410
411 ret = transfer_max_buffers(pipe, address, address_end, is_write,
412 last_page, last_page_size, &consumed_size,
413 &status);
414 if (ret < 0)
415 break;
416
417 if (consumed_size > 0) {
418 /* No matter what's the status, we've transferred
419 * something.
420 */
421 count += consumed_size;
422 address += consumed_size;
423 }
424 if (status > 0)
425 continue;
426 if (status == 0) {
427 /* EOF */
428 ret = 0;
429 break;
430 }
431 if (count > 0) {
432 /*
433 * An error occurred, but we already transferred
434 * something on one of the previous iterations.
435 * Just return what we already copied and log this
436 * err.
437 */
438 if (status != PIPE_ERROR_AGAIN)
439 dev_err_ratelimited(pdev_dev,
440 "goldfish_pipe: backend error %d on %s\n",
441 status, is_write ? "write" : "read");
442 break;
443 }
444
445 /*
446 * If the error is not PIPE_ERROR_AGAIN, or if we are in
447 * non-blocking mode, just return the error code.
448 */
449 if (status != PIPE_ERROR_AGAIN ||
450 (filp->f_flags & O_NONBLOCK) != 0) {
451 ret = goldfish_pipe_error_convert(status);
452 break;
453 }
454
455 status = wait_for_host_signal(pipe, is_write);
456 if (status < 0)
457 return status;
458 }
459
460 if (count > 0)
461 return count;
462 return ret;
463 }
464
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (30796 bytes)
Powered by blists - more mailing lists