Commit 6d1029b56329b1cc9b7233e5333c1a48ddbbfad8

Authored by Akinobu Mita
Committed by Linus Torvalds
1 parent 337e2ab5d1

add kernel-doc for simple_read_from_buffer and memory_read_from_buffer

Add kernel-doc comments describing simple_read_from_buffer and
memory_read_from_buffer.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 28 additions and 0 deletions Side-by-side Diff

... ... @@ -512,6 +512,20 @@
512 512 mntput(mnt);
513 513 }
514 514  
  515 +/**
  516 + * simple_read_from_buffer - copy data from the buffer to user space
  517 + * @to: the user space buffer to read to
  518 + * @count: the maximum number of bytes to read
  519 + * @ppos: the current position in the buffer
  520 + * @from: the buffer to read from
  521 + * @available: the size of the buffer
  522 + *
  523 + * The simple_read_from_buffer() function reads up to @count bytes from the
  524 + * buffer @from at offset @ppos into the user space address starting at @to.
  525 + *
  526 + * On success, the number of bytes read is returned and the offset @ppos is
  527 + * advanced by this number, or negative value is returned on error.
  528 + **/
515 529 ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos,
516 530 const void *from, size_t available)
517 531 {
... ... @@ -528,6 +542,20 @@
528 542 return count;
529 543 }
530 544  
  545 +/**
  546 + * memory_read_from_buffer - copy data from the buffer
  547 + * @to: the kernel space buffer to read to
  548 + * @count: the maximum number of bytes to read
  549 + * @ppos: the current position in the buffer
  550 + * @from: the buffer to read from
  551 + * @available: the size of the buffer
  552 + *
  553 + * The memory_read_from_buffer() function reads up to @count bytes from the
  554 + * buffer @from at offset @ppos into the kernel space address starting at @to.
  555 + *
  556 + * On success, the number of bytes read is returned and the offset @ppos is
  557 + * advanced by this number, or negative value is returned on error.
  558 + **/
531 559 ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
532 560 const void *from, size_t available)
533 561 {