Skip to content

Commit

Permalink
[PATCH] DocBook: fix some descriptions
Browse files Browse the repository at this point in the history
Some KernelDoc descriptions are updated to match the current code.
No code changes.

Signed-off-by: Martin Waitz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
tali authored and Linus Torvalds committed May 1, 2005
1 parent 6013d54 commit 67be2dd
Show file tree
Hide file tree
Showing 22 changed files with 160 additions and 137 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);

/**
* setup_sys_fs_device_files - sets up the device files under device namespace
* @@dev: acpi_device object
* @@func: function pointer to create or destroy the device file
* @dev: acpi_device object
* @func: function pointer to create or destroy the device file
*/
static void
setup_sys_fs_device_files (
Expand Down
4 changes: 2 additions & 2 deletions drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int platform_add_devices(struct platform_device **devs, int num)

/**
* platform_device_register - add a platform-level device
* @dev: platform device we're adding
* @pdev: platform device we're adding
*
*/
int platform_device_register(struct platform_device * pdev)
Expand Down Expand Up @@ -174,7 +174,7 @@ int platform_device_register(struct platform_device * pdev)

/**
* platform_device_unregister - remove a platform-level device
* @dev: platform device we're removing
* @pdev: platform device we're removing
*
* Note that this function will also release all memory- and port-based
* resources owned by the device (@dev->resource).
Expand Down
4 changes: 4 additions & 0 deletions drivers/pci/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ static int pci_visit_bridge (struct pci_visit * fn,

/**
* pci_visit_dev - scans the pci buses.
* @fn: callback functions that are called while visiting
* @wrapped_dev: the device to scan
* @wrapped_parent: the bus where @wrapped_dev is connected to
*
* Every bus and every function is presented to a custom
* function that can act upon it.
*/
Expand Down
14 changes: 7 additions & 7 deletions drivers/pci/rom.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* pci_enable_rom - enable ROM decoding for a PCI device
* @dev: PCI device to enable
* @pdev: PCI device to enable
*
* Enable ROM decoding on @dev. This involves simply turning on the last
* bit of the PCI ROM BAR. Note that some cards may share address decoders
Expand All @@ -32,7 +32,7 @@ static void pci_enable_rom(struct pci_dev *pdev)

/**
* pci_disable_rom - disable ROM decoding for a PCI device
* @dev: PCI device to disable
* @pdev: PCI device to disable
*
* Disable ROM decoding on a PCI device by turning off the last bit in the
* ROM BAR.
Expand All @@ -47,7 +47,7 @@ static void pci_disable_rom(struct pci_dev *pdev)

/**
* pci_map_rom - map a PCI ROM to kernel space
* @dev: pointer to pci device struct
* @pdev: pointer to pci device struct
* @size: pointer to receive size of pci window over ROM
* @return: kernel virtual pointer to image of ROM
*
Expand Down Expand Up @@ -132,7 +132,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)

/**
* pci_map_rom_copy - map a PCI ROM to kernel space, create a copy
* @dev: pointer to pci device struct
* @pdev: pointer to pci device struct
* @size: pointer to receive size of pci window over ROM
* @return: kernel virtual pointer to image of ROM
*
Expand Down Expand Up @@ -166,7 +166,7 @@ void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size)

/**
* pci_unmap_rom - unmap the ROM from kernel space
* @dev: pointer to pci device struct
* @pdev: pointer to pci device struct
* @rom: virtual address of the previous mapping
*
* Remove a mapping of a previously mapped ROM
Expand All @@ -187,7 +187,7 @@ void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom)

/**
* pci_remove_rom - disable the ROM and remove its sysfs attribute
* @dev: pointer to pci device struct
* @pdev: pointer to pci device struct
*
* Remove the rom file in sysfs and disable ROM decoding.
*/
Expand All @@ -206,7 +206,7 @@ void pci_remove_rom(struct pci_dev *pdev)
/**
* pci_cleanup_rom - internal routine for freeing the ROM copy created
* by pci_map_rom_copy called from remove.c
* @dev: pointer to pci device struct
* @pdev: pointer to pci device struct
*
* Free the copied ROM if we allocated one.
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/pnp/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void pnp_init_resource_table(struct pnp_resource_table *table)

/**
* pnp_clean_resources - clears resources that were not manually set
* @res - the resources to clean
* @res: the resources to clean
*
*/
static void pnp_clean_resource_table(struct pnp_resource_table * res)
Expand Down
2 changes: 2 additions & 0 deletions fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ inline void bio_init(struct bio *bio)
* bio_alloc_bioset - allocate a bio for I/O
* @gfp_mask: the GFP_ mask given to the slab allocator
* @nr_iovecs: number of iovecs to pre-allocate
* @bs: the bio_set to allocate from
*
* Description:
* bio_alloc_bioset will first try it's on mempool to satisfy the allocation.
Expand Down Expand Up @@ -629,6 +630,7 @@ static struct bio *__bio_map_user(request_queue_t *q, struct block_device *bdev,

/**
* bio_map_user - map user address into bio
* @q: the request_queue_t for the bio
* @bdev: destination block device
* @uaddr: start of user address
* @len: length in bytes
Expand Down
11 changes: 6 additions & 5 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,15 +774,14 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list)
/**
* sync_mapping_buffers - write out and wait upon a mapping's "associated"
* buffers
* @buffer_mapping - the mapping which backs the buffers' data
* @mapping - the mapping which wants those buffers written
* @mapping: the mapping which wants those buffers written
*
* Starts I/O against the buffers at mapping->private_list, and waits upon
* that I/O.
*
* Basically, this is a convenience function for fsync(). @buffer_mapping is
* the blockdev which "owns" the buffers and @mapping is a file or directory
* which needs those buffers to be written for a successful fsync().
* Basically, this is a convenience function for fsync().
* @mapping is a file or directory which needs those buffers to be written for
* a successful fsync().
*/
int sync_mapping_buffers(struct address_space *mapping)
{
Expand Down Expand Up @@ -1263,6 +1262,7 @@ __getblk_slow(struct block_device *bdev, sector_t block, int size)

/**
* mark_buffer_dirty - mark a buffer_head as needing writeout
* @bh: the buffer_head to mark dirty
*
* mark_buffer_dirty() will set the dirty bit against the buffer, then set its
* backing page dirty, then tag the page as dirty in its address_space's radix
Expand Down Expand Up @@ -1501,6 +1501,7 @@ EXPORT_SYMBOL(__breadahead);

/**
* __bread() - reads a specified block and returns the bh
* @bdev: the block_device to read from
* @block: number of block
* @size: size (in bytes) to read
*
Expand Down
4 changes: 3 additions & 1 deletion fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ static struct super_block *get_super_to_sync(void)
}

/**
* sync_inodes
* sync_inodes - writes all inodes to disk
* @wait: wait for completion
*
* sync_inodes() goes through each super block's dirty inode list, writes the
* inodes out, waits on the writeout and puts the inodes back on the normal
Expand Down Expand Up @@ -604,6 +605,7 @@ EXPORT_SYMBOL(sync_inode);
/**
* generic_osync_inode - flush all dirty data for a given inode to disk
* @inode: inode to write
* @mapping: the address_space that should be flushed
* @what: what to write and wait upon
*
* This can be called by file_write functions for files which have the
Expand Down
92 changes: 46 additions & 46 deletions fs/mpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,52 +160,6 @@ map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block)
} while (page_bh != head);
}

/**
* mpage_readpages - populate an address space with some pages, and
* start reads against them.
*
* @mapping: the address_space
* @pages: The address of a list_head which contains the target pages. These
* pages have their ->index populated and are otherwise uninitialised.
*
* The page at @pages->prev has the lowest file offset, and reads should be
* issued in @pages->prev to @pages->next order.
*
* @nr_pages: The number of pages at *@pages
* @get_block: The filesystem's block mapper function.
*
* This function walks the pages and the blocks within each page, building and
* emitting large BIOs.
*
* If anything unusual happens, such as:
*
* - encountering a page which has buffers
* - encountering a page which has a non-hole after a hole
* - encountering a page with non-contiguous blocks
*
* then this code just gives up and calls the buffer_head-based read function.
* It does handle a page which has holes at the end - that is a common case:
* the end-of-file on blocksize < PAGE_CACHE_SIZE setups.
*
* BH_Boundary explanation:
*
* There is a problem. The mpage read code assembles several pages, gets all
* their disk mappings, and then submits them all. That's fine, but obtaining
* the disk mappings may require I/O. Reads of indirect blocks, for example.
*
* So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be
* submitted in the following order:
* 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
* because the indirect block has to be read to get the mappings of blocks
* 13,14,15,16. Obviously, this impacts performance.
*
* So what we do it to allow the filesystem's get_block() function to set
* BH_Boundary when it maps block 11. BH_Boundary says: mapping of the block
* after this one will require I/O against a block which is probably close to
* this one. So you should push what I/O you have currently accumulated.
*
* This all causes the disk requests to be issued in the correct order.
*/
static struct bio *
do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
sector_t *last_block_in_bio, get_block_t get_block)
Expand Down Expand Up @@ -320,6 +274,52 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
goto out;
}

/**
* mpage_readpages - populate an address space with some pages, and
* start reads against them.
*
* @mapping: the address_space
* @pages: The address of a list_head which contains the target pages. These
* pages have their ->index populated and are otherwise uninitialised.
*
* The page at @pages->prev has the lowest file offset, and reads should be
* issued in @pages->prev to @pages->next order.
*
* @nr_pages: The number of pages at *@pages
* @get_block: The filesystem's block mapper function.
*
* This function walks the pages and the blocks within each page, building and
* emitting large BIOs.
*
* If anything unusual happens, such as:
*
* - encountering a page which has buffers
* - encountering a page which has a non-hole after a hole
* - encountering a page with non-contiguous blocks
*
* then this code just gives up and calls the buffer_head-based read function.
* It does handle a page which has holes at the end - that is a common case:
* the end-of-file on blocksize < PAGE_CACHE_SIZE setups.
*
* BH_Boundary explanation:
*
* There is a problem. The mpage read code assembles several pages, gets all
* their disk mappings, and then submits them all. That's fine, but obtaining
* the disk mappings may require I/O. Reads of indirect blocks, for example.
*
* So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be
* submitted in the following order:
* 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
* because the indirect block has to be read to get the mappings of blocks
* 13,14,15,16. Obviously, this impacts performance.
*
* So what we do it to allow the filesystem's get_block() function to set
* BH_Boundary when it maps block 11. BH_Boundary says: mapping of the block
* after this one will require I/O against a block which is probably close to
* this one. So you should push what I/O you have currently accumulated.
*
* This all causes the disk requests to be issued in the correct order.
*/
int
mpage_readpages(struct address_space *mapping, struct list_head *pages,
unsigned nr_pages, get_block_t get_block)
Expand Down
2 changes: 1 addition & 1 deletion fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ struct dentry *proc_pid_unhash(struct task_struct *p)

/**
* proc_pid_flush - recover memory used by stale /proc/@pid/x entries
* @proc_entry: directoy to prune.
* @proc_dentry: directoy to prune.
*
* Shrink the /proc directory that was used by the just killed thread.
*/
Expand Down
9 changes: 7 additions & 2 deletions fs/seq_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ EXPORT_SYMBOL(seq_open);

/**
* seq_read - ->read() method for sequential files.
* @file, @buf, @size, @ppos: see file_operations method
* @file: the file to read from
* @buf: the buffer to read to
* @size: the maximum number of bytes to read
* @ppos: the current position in the file
*
* Ready-made ->f_op->read()
*/
Expand Down Expand Up @@ -219,7 +222,9 @@ static int traverse(struct seq_file *m, loff_t offset)

/**
* seq_lseek - ->llseek() method for sequential files.
* @file, @offset, @origin: see file_operations method
* @file: the file in question
* @offset: new position
* @origin: 0 for absolute, 1 for relative position
*
* Ready-made ->f_op->llseek()
*/
Expand Down
4 changes: 2 additions & 2 deletions fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
/**
* flush_read_buffer - push buffer to userspace.
* @buffer: data buffer for file.
* @userbuf: user-passed buffer.
* @buf: user-passed buffer.
* @count: number of bytes requested.
* @ppos: file position.
*
Expand Down Expand Up @@ -164,7 +164,7 @@ sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
/**
* fill_write_buffer - copy buffer from userspace.
* @buffer: data buffer for file.
* @userbuf: data from user.
* @buf: data from user.
* @count: number of bytes in @userbuf.
*
* Allocate @buffer->page if it hasn't been already, then
Expand Down
Loading

0 comments on commit 67be2dd

Please sign in to comment.