Skip to content

Commit

Permalink
[PATCH] Numerous fixes to kernel-doc info in source files.
Browse files Browse the repository at this point in the history
A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
source files, including:

  * make multi-line initial descriptions single line
  * denote some function names, constants and structs as such
  * change erroneous opening '/*' to '/**' in a few places
  * reword some text for clarity

Signed-off-by: Robert P. J. Day <[email protected]>
Cc: "Randy.Dunlap" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Robert P. J. Day authored and Linus Torvalds committed Feb 11, 2007
1 parent 262086c commit 72fd4a3
Show file tree
Hide file tree
Showing 33 changed files with 105 additions and 116 deletions.
4 changes: 2 additions & 2 deletions include/asm-i386/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))

/**
* atomic_add_unless - add unless the number is a given value
* atomic_add_unless - add unless the number is already a given value
* @v: pointer of type atomic_t
* @a: the amount to add to v...
* @u: ...unless v is equal to u.
*
* Atomically adds @a to @v, so long as it was not @u.
* Atomically adds @a to @v, so long as @v was not already @u.
* Returns non-zero if @v was not @u, and zero otherwise.
*/
#define atomic_add_unless(v, a, u) \
Expand Down
4 changes: 2 additions & 2 deletions include/asm-i386/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word)
*
* This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
* differs in spirit from the above ffz() (man ffs).
*/
static inline int ffs(int x)
{
Expand All @@ -388,7 +388,7 @@ static inline int ffs(int x)
* fls - find last bit set
* @x: the word to search
*
* This is defined the same way as ffs.
* This is defined the same way as ffs().
*/
static inline int fls(int x)
{
Expand Down
2 changes: 1 addition & 1 deletion include/linux/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void __init parse_early_param(void);
* module_init() - driver initialization entry point
* @x: function to be run at kernel boot time or module insertion
*
* module_init() will either be called during do_initcalls (if
* module_init() will either be called during do_initcalls() (if
* builtin) or at module insertion time (if a module). There can only
* be one per module.
*/
Expand Down
6 changes: 3 additions & 3 deletions include/linux/kfifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
* @buffer: the data to be added.
* @len: the length of the data to be added.
*
* This function copies at most 'len' bytes from the 'buffer' into
* This function copies at most @len bytes from the @buffer into
* the FIFO depending on the free space, and returns the number of
* bytes copied.
*/
Expand All @@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
* @buffer: where the data must be copied.
* @len: the size of the destination buffer.
*
* This function copies at most 'len' bytes from the FIFO into the
* 'buffer' and returns the number of copied bytes.
* This function copies at most @len bytes from the FIFO into the
* @buffer and returns the number of copied bytes.
*/
static inline unsigned int kfifo_get(struct kfifo *fifo,
unsigned char *buffer, unsigned int len)
Expand Down
6 changes: 3 additions & 3 deletions include/linux/ktime.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
* @add1: addend1
* @add2: addend2
*
* Returns the sum of addend1 and addend2
* Returns the sum of @add1 and @add2.
*/
static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
{
Expand All @@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
* @kt: addend
* @nsec: the scalar nsec value to add
*
* Returns the sum of kt and nsec in ktime_t format
* Returns the sum of @kt and @nsec in ktime_t format
*/
extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);

Expand Down Expand Up @@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
* ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
* @kt: the ktime_t variable to convert
*
* Returns the scalar nanoseconds representation of kt
* Returns the scalar nanoseconds representation of @kt
*/
static inline s64 ktime_to_ns(const ktime_t kt)
{
Expand Down
11 changes: 6 additions & 5 deletions include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
/**
* list_del - deletes entry from list.
* @entry: the element to delete from the list.
* Note: list_empty on entry does not return true after this, the entry is
* Note: list_empty() on entry does not return true after this, the entry is
* in an undefined state.
*/
#ifndef CONFIG_DEBUG_LIST
Expand All @@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry);
* list_del_rcu - deletes entry from list without re-initialization
* @entry: the element to delete from the list.
*
* Note: list_empty on entry does not return true after this,
* Note: list_empty() on entry does not return true after this,
* the entry is in an undefined state. It is useful for RCU based
* lockfree traversal.
*
Expand Down Expand Up @@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry)
* list_replace - replace old entry by new one
* @old : the element to be replaced
* @new : the new element to insert
* Note: if 'old' was empty, it will be overwritten.
*
* If @old was empty, it will be overwritten.
*/
static inline void list_replace(struct list_head *old,
struct list_head *new)
Expand Down Expand Up @@ -488,12 +489,12 @@ static inline void list_splice_init_rcu(struct list_head *list,
pos = list_entry(pos->member.prev, typeof(*pos), member))

/**
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
* @pos: the type * to use as a start point
* @head: the head of the list
* @member: the name of the list_struct within the struct.
*
* Prepares a pos entry for use as a start point in list_for_each_entry_continue.
* Prepares a pos entry for use as a start point in list_for_each_entry_continue().
*/
#define list_prepare_entry(pos, head, member) \
((pos) ? : list_entry(head, typeof(*pos), member))
Expand Down
21 changes: 10 additions & 11 deletions ipc/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void free_ipc_ns(struct kref *kref)
* ipc_init - initialise IPC subsystem
*
* The various system5 IPC resources (semaphores, messages and shared
* memory are initialised
* memory) are initialised
*/

static int __init ipc_init(void)
Expand Down Expand Up @@ -207,8 +207,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size)
#ifdef CONFIG_PROC_FS
static struct file_operations sysvipc_proc_fops;
/**
* ipc_init_proc_interface - Create a proc interface for sysipc types
* using a seq_file interface.
* ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface.
* @path: Path in procfs
* @header: Banner to be printed at the beginning of the file.
* @ids: ipc id table to iterate.
Expand Down Expand Up @@ -417,7 +416,7 @@ void* ipc_alloc(int size)
* @ptr: pointer returned by ipc_alloc
* @size: size of block
*
* Free a block created with ipc_alloc. The caller must know the size
* Free a block created with ipc_alloc(). The caller must know the size
* used in the allocation call.
*/

Expand Down Expand Up @@ -524,7 +523,7 @@ static void ipc_do_vfree(struct work_struct *work)
* @head: RCU callback structure for queued work
*
* Since RCU callback function is called in bh,
* we need to defer the vfree to schedule_work
* we need to defer the vfree to schedule_work().
*/
static void ipc_schedule_free(struct rcu_head *head)
{
Expand All @@ -541,7 +540,7 @@ static void ipc_schedule_free(struct rcu_head *head)
* ipc_immediate_free - free ipc + rcu space
* @head: RCU callback structure that contains pointer to be freed
*
* Free from the RCU callback context
* Free from the RCU callback context.
*/
static void ipc_immediate_free(struct rcu_head *head)
{
Expand Down Expand Up @@ -603,8 +602,8 @@ int ipcperms (struct kern_ipc_perm *ipcp, short flag)
* @in: kernel permissions
* @out: new style IPC permissions
*
* Turn the kernel object 'in' into a set of permissions descriptions
* for returning to userspace (out).
* Turn the kernel object @in into a set of permissions descriptions
* for returning to userspace (@out).
*/


Expand All @@ -624,8 +623,8 @@ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out)
* @in: new style IPC permissions
* @out: old style IPC permissions
*
* Turn the new style permissions object in into a compatibility
* object and store it into the 'out' pointer.
* Turn the new style permissions object @in into a compatibility
* object and store it into the @out pointer.
*/

void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out)
Expand Down Expand Up @@ -722,7 +721,7 @@ int ipc_checkid(struct ipc_ids* ids, struct kern_ipc_perm* ipcp, int uid)
* @cmd: pointer to command
*
* Return IPC_64 for new style IPC and IPC_OLD for old style IPC.
* The cmd value is turned from an encoding command and version into
* The @cmd value is turned from an encoding command and version into
* just the command code.
*/

Expand Down
3 changes: 1 addition & 2 deletions kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ static int has_stopped_jobs(int pgrp)
}

/**
* reparent_to_init - Reparent the calling kernel thread to the init task
* of the pid space that the thread belongs to.
* reparent_to_init - Reparent the calling kernel thread to the init task of the pid space that the thread belongs to.
*
* If a kernel thread is launched as a result of a system call, or if
* it ever exits, it should generally reparent itself to init so that
Expand Down
6 changes: 3 additions & 3 deletions kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static DEFINE_PER_CPU(struct hrtimer_base, hrtimer_bases[MAX_HRTIMER_BASES]) =
*
* The function calculates the monotonic clock from the realtime
* clock and the wall_to_monotonic offset and stores the result
* in normalized timespec format in the variable pointed to by ts.
* in normalized timespec format in the variable pointed to by @ts.
*/
void ktime_get_ts(struct timespec *ts)
{
Expand Down Expand Up @@ -583,8 +583,8 @@ EXPORT_SYMBOL_GPL(hrtimer_init);
* @which_clock: which clock to query
* @tp: pointer to timespec variable to store the resolution
*
* Store the resolution of the clock selected by which_clock in the
* variable pointed to by tp.
* Store the resolution of the clock selected by @which_clock in the
* variable pointed to by @tp.
*/
int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp)
{
Expand Down
10 changes: 5 additions & 5 deletions kernel/kfifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* @gfp_mask: get_free_pages mask, passed to kmalloc()
* @lock: the lock to be used to protect the fifo buffer
*
* Do NOT pass the kfifo to kfifo_free() after use ! Simply free the
* struct kfifo with kfree().
* Do NOT pass the kfifo to kfifo_free() after use! Simply free the
* &struct kfifo with kfree().
*/
struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
gfp_t gfp_mask, spinlock_t *lock)
Expand Down Expand Up @@ -108,7 +108,7 @@ EXPORT_SYMBOL(kfifo_free);
* @buffer: the data to be added.
* @len: the length of the data to be added.
*
* This function copies at most 'len' bytes from the 'buffer' into
* This function copies at most @len bytes from the @buffer into
* the FIFO depending on the free space, and returns the number of
* bytes copied.
*
Expand Down Expand Up @@ -155,8 +155,8 @@ EXPORT_SYMBOL(__kfifo_put);
* @buffer: where the data must be copied.
* @len: the size of the destination buffer.
*
* This function copies at most 'len' bytes from the FIFO into the
* 'buffer' and returns the number of copied bytes.
* This function copies at most @len bytes from the FIFO into the
* @buffer and returns the number of copied bytes.
*
* Note that with only one concurrent reader and one concurrent
* writer, you don't need extra locking to use these functions.
Expand Down
6 changes: 3 additions & 3 deletions kernel/kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static struct kthread_stop_info kthread_stop_info;
/**
* kthread_should_stop - should this kthread return now?
*
* When someone calls kthread_stop on your kthread, it will be woken
* When someone calls kthread_stop() on your kthread, it will be woken
* and this will return true. You should then return, and your return
* value will be passed through to kthread_stop().
*/
Expand Down Expand Up @@ -143,7 +143,7 @@ static void keventd_create_kthread(struct work_struct *work)
* it. See also kthread_run(), kthread_create_on_cpu().
*
* When woken, the thread will run @threadfn() with @data as its
* argument. @threadfn can either call do_exit() directly if it is a
* argument. @threadfn() can either call do_exit() directly if it is a
* standalone thread for which noone will call kthread_stop(), or
* return when 'kthread_should_stop()' is true (which means
* kthread_stop() has been called). The return value should be zero
Expand Down Expand Up @@ -192,7 +192,7 @@ EXPORT_SYMBOL(kthread_create);
*
* Description: This function is equivalent to set_cpus_allowed(),
* except that @cpu doesn't need to be online, and the thread must be
* stopped (i.e., just returned from kthread_create().
* stopped (i.e., just returned from kthread_create()).
*/
void kthread_bind(struct task_struct *k, unsigned int cpu)
{
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ static int have_callable_console(void)
* printk - print a kernel message
* @fmt: format string
*
* This is printk. It can be called from any context. We want it to work.
* This is printk(). It can be called from any context. We want it to work.
*
* We try to grab the console_sem. If we succeed, it's easy - we log the output and
* call the console drivers. If we fail to get the semaphore we place the output
Expand Down
12 changes: 6 additions & 6 deletions kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void wakeup_readers(struct work_struct *work)
* @buf: the channel buffer
* @init: 1 if this is a first-time initialization
*
* See relay_reset for description of effect.
* See relay_reset() for description of effect.
*/
static void __relay_reset(struct rchan_buf *buf, unsigned int init)
{
Expand Down Expand Up @@ -364,7 +364,7 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init)
* and restarting the channel in its initial state. The buffers
* are not freed, so any mappings are still in effect.
*
* NOTE: Care should be taken that the channel isn't actually
* NOTE. Care should be taken that the channel isn't actually
* being used by anything when this call is made.
*/
void relay_reset(struct rchan *chan)
Expand Down Expand Up @@ -528,7 +528,7 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
* Creates a channel buffer for each cpu using the sizes and
* attributes specified. The created channel buffer files
* will be named base_filename0...base_filenameN-1. File
* permissions will be S_IRUSR.
* permissions will be %S_IRUSR.
*/
struct rchan *relay_open(const char *base_filename,
struct dentry *parent,
Expand Down Expand Up @@ -648,7 +648,7 @@ EXPORT_SYMBOL_GPL(relay_switch_subbuf);
* subbufs_consumed should be the number of sub-buffers newly consumed,
* not the total consumed.
*
* NOTE: Kernel clients don't need to call this function if the channel
* NOTE. Kernel clients don't need to call this function if the channel
* mode is 'overwrite'.
*/
void relay_subbufs_consumed(struct rchan *chan,
Expand Down Expand Up @@ -749,7 +749,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
* @filp: the file
* @vma: the vma describing what to map
*
* Calls upon relay_mmap_buf to map the file into user space.
* Calls upon relay_mmap_buf() to map the file into user space.
*/
static int relay_file_mmap(struct file *filp, struct vm_area_struct *vma)
{
Expand Down Expand Up @@ -891,7 +891,7 @@ static size_t relay_file_read_subbuf_avail(size_t read_pos,
* @read_pos: file read position
* @buf: relay channel buffer
*
* If the read_pos is in the middle of padding, return the
* If the @read_pos is in the middle of padding, return the
* position of the first actually available byte, otherwise
* return the original value.
*/
Expand Down
9 changes: 4 additions & 5 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4203,13 +4203,12 @@ static void __setscheduler(struct task_struct *p, int policy, int prio)
}

/**
* sched_setscheduler - change the scheduling policy and/or RT priority of
* a thread.
* sched_setscheduler - change the scheduling policy and/or RT priority of a thread.
* @p: the task in question.
* @policy: new policy.
* @param: structure containing the new RT priority.
*
* NOTE: the task may be already dead
* NOTE that the task may be already dead.
*/
int sched_setscheduler(struct task_struct *p, int policy,
struct sched_param *param)
Expand Down Expand Up @@ -4577,7 +4576,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
/**
* sys_sched_yield - yield the current processor to other threads.
*
* this function yields the current CPU by moving the calling thread
* This function yields the current CPU by moving the calling thread
* to the expired array. If there are no other threads running on this
* CPU then this function will return.
*/
Expand Down Expand Up @@ -4704,7 +4703,7 @@ EXPORT_SYMBOL(cond_resched_softirq);
/**
* yield - yield the current processor to other threads.
*
* this is a shortcut for kernel-space yielding - it marks the
* This is a shortcut for kernel-space yielding - it marks the
* thread runnable and calls sys_sched_yield().
*/
void __sched yield(void)
Expand Down
Loading

0 comments on commit 72fd4a3

Please sign in to comment.