Skip to content

Commit 72fd4a3

Browse files
Robert P. J. DayLinus Torvalds
Robert P. J. Day
authored and
Linus Torvalds
committed
[PATCH] Numerous fixes to kernel-doc info in source files.
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 <rpjday@mindspring.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 262086c commit 72fd4a3

33 files changed

+105
-116
lines changed

include/asm-i386/atomic.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
211211
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
212212

213213
/**
214-
* atomic_add_unless - add unless the number is a given value
214+
* atomic_add_unless - add unless the number is already a given value
215215
* @v: pointer of type atomic_t
216216
* @a: the amount to add to v...
217217
* @u: ...unless v is equal to u.
218218
*
219-
* Atomically adds @a to @v, so long as it was not @u.
219+
* Atomically adds @a to @v, so long as @v was not already @u.
220220
* Returns non-zero if @v was not @u, and zero otherwise.
221221
*/
222222
#define atomic_add_unless(v, a, u) \

include/asm-i386/bitops.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word)
371371
*
372372
* This is defined the same way as
373373
* the libc and compiler builtin ffs routines, therefore
374-
* differs in spirit from the above ffz (man ffs).
374+
* differs in spirit from the above ffz() (man ffs).
375375
*/
376376
static inline int ffs(int x)
377377
{
@@ -388,7 +388,7 @@ static inline int ffs(int x)
388388
* fls - find last bit set
389389
* @x: the word to search
390390
*
391-
* This is defined the same way as ffs.
391+
* This is defined the same way as ffs().
392392
*/
393393
static inline int fls(int x)
394394
{

include/linux/init.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void __init parse_early_param(void);
172172
* module_init() - driver initialization entry point
173173
* @x: function to be run at kernel boot time or module insertion
174174
*
175-
* module_init() will either be called during do_initcalls (if
175+
* module_init() will either be called during do_initcalls() (if
176176
* builtin) or at module insertion time (if a module). There can only
177177
* be one per module.
178178
*/

include/linux/kfifo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
7474
* @buffer: the data to be added.
7575
* @len: the length of the data to be added.
7676
*
77-
* This function copies at most 'len' bytes from the 'buffer' into
77+
* This function copies at most @len bytes from the @buffer into
7878
* the FIFO depending on the free space, and returns the number of
7979
* bytes copied.
8080
*/
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
9999
* @buffer: where the data must be copied.
100100
* @len: the size of the destination buffer.
101101
*
102-
* This function copies at most 'len' bytes from the FIFO into the
103-
* 'buffer' and returns the number of copied bytes.
102+
* This function copies at most @len bytes from the FIFO into the
103+
* @buffer and returns the number of copied bytes.
104104
*/
105105
static inline unsigned int kfifo_get(struct kfifo *fifo,
106106
unsigned char *buffer, unsigned int len)

include/linux/ktime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
163163
* @add1: addend1
164164
* @add2: addend2
165165
*
166-
* Returns the sum of addend1 and addend2
166+
* Returns the sum of @add1 and @add2.
167167
*/
168168
static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
169169
{
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
189189
* @kt: addend
190190
* @nsec: the scalar nsec value to add
191191
*
192-
* Returns the sum of kt and nsec in ktime_t format
192+
* Returns the sum of @kt and @nsec in ktime_t format
193193
*/
194194
extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
195195

@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
246246
* ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
247247
* @kt: the ktime_t variable to convert
248248
*
249-
* Returns the scalar nanoseconds representation of kt
249+
* Returns the scalar nanoseconds representation of @kt
250250
*/
251251
static inline s64 ktime_to_ns(const ktime_t kt)
252252
{

include/linux/list.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
161161
/**
162162
* list_del - deletes entry from list.
163163
* @entry: the element to delete from the list.
164-
* Note: list_empty on entry does not return true after this, the entry is
164+
* Note: list_empty() on entry does not return true after this, the entry is
165165
* in an undefined state.
166166
*/
167167
#ifndef CONFIG_DEBUG_LIST
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry);
179179
* list_del_rcu - deletes entry from list without re-initialization
180180
* @entry: the element to delete from the list.
181181
*
182-
* Note: list_empty on entry does not return true after this,
182+
* Note: list_empty() on entry does not return true after this,
183183
* the entry is in an undefined state. It is useful for RCU based
184184
* lockfree traversal.
185185
*
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry)
209209
* list_replace - replace old entry by new one
210210
* @old : the element to be replaced
211211
* @new : the new element to insert
212-
* Note: if 'old' was empty, it will be overwritten.
212+
*
213+
* If @old was empty, it will be overwritten.
213214
*/
214215
static inline void list_replace(struct list_head *old,
215216
struct list_head *new)
@@ -488,12 +489,12 @@ static inline void list_splice_init_rcu(struct list_head *list,
488489
pos = list_entry(pos->member.prev, typeof(*pos), member))
489490

490491
/**
491-
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue
492+
* list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
492493
* @pos: the type * to use as a start point
493494
* @head: the head of the list
494495
* @member: the name of the list_struct within the struct.
495496
*
496-
* Prepares a pos entry for use as a start point in list_for_each_entry_continue.
497+
* Prepares a pos entry for use as a start point in list_for_each_entry_continue().
497498
*/
498499
#define list_prepare_entry(pos, head, member) \
499500
((pos) ? : list_entry(head, typeof(*pos), member))

ipc/util.c

+10-11
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void free_ipc_ns(struct kref *kref)
150150
* ipc_init - initialise IPC subsystem
151151
*
152152
* The various system5 IPC resources (semaphores, messages and shared
153-
* memory are initialised
153+
* memory) are initialised
154154
*/
155155

156156
static int __init ipc_init(void)
@@ -207,8 +207,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size)
207207
#ifdef CONFIG_PROC_FS
208208
static struct file_operations sysvipc_proc_fops;
209209
/**
210-
* ipc_init_proc_interface - Create a proc interface for sysipc types
211-
* using a seq_file interface.
210+
* ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface.
212211
* @path: Path in procfs
213212
* @header: Banner to be printed at the beginning of the file.
214213
* @ids: ipc id table to iterate.
@@ -417,7 +416,7 @@ void* ipc_alloc(int size)
417416
* @ptr: pointer returned by ipc_alloc
418417
* @size: size of block
419418
*
420-
* Free a block created with ipc_alloc. The caller must know the size
419+
* Free a block created with ipc_alloc(). The caller must know the size
421420
* used in the allocation call.
422421
*/
423422

@@ -524,7 +523,7 @@ static void ipc_do_vfree(struct work_struct *work)
524523
* @head: RCU callback structure for queued work
525524
*
526525
* Since RCU callback function is called in bh,
527-
* we need to defer the vfree to schedule_work
526+
* we need to defer the vfree to schedule_work().
528527
*/
529528
static void ipc_schedule_free(struct rcu_head *head)
530529
{
@@ -541,7 +540,7 @@ static void ipc_schedule_free(struct rcu_head *head)
541540
* ipc_immediate_free - free ipc + rcu space
542541
* @head: RCU callback structure that contains pointer to be freed
543542
*
544-
* Free from the RCU callback context
543+
* Free from the RCU callback context.
545544
*/
546545
static void ipc_immediate_free(struct rcu_head *head)
547546
{
@@ -603,8 +602,8 @@ int ipcperms (struct kern_ipc_perm *ipcp, short flag)
603602
* @in: kernel permissions
604603
* @out: new style IPC permissions
605604
*
606-
* Turn the kernel object 'in' into a set of permissions descriptions
607-
* for returning to userspace (out).
605+
* Turn the kernel object @in into a set of permissions descriptions
606+
* for returning to userspace (@out).
608607
*/
609608

610609

@@ -624,8 +623,8 @@ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out)
624623
* @in: new style IPC permissions
625624
* @out: old style IPC permissions
626625
*
627-
* Turn the new style permissions object in into a compatibility
628-
* object and store it into the 'out' pointer.
626+
* Turn the new style permissions object @in into a compatibility
627+
* object and store it into the @out pointer.
629628
*/
630629

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

kernel/exit.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ static int has_stopped_jobs(int pgrp)
257257
}
258258

259259
/**
260-
* reparent_to_init - Reparent the calling kernel thread to the init task
261-
* of the pid space that the thread belongs to.
260+
* reparent_to_init - Reparent the calling kernel thread to the init task of the pid space that the thread belongs to.
262261
*
263262
* If a kernel thread is launched as a result of a system call, or if
264263
* it ever exits, it should generally reparent itself to init so that

kernel/hrtimer.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static DEFINE_PER_CPU(struct hrtimer_base, hrtimer_bases[MAX_HRTIMER_BASES]) =
102102
*
103103
* The function calculates the monotonic clock from the realtime
104104
* clock and the wall_to_monotonic offset and stores the result
105-
* in normalized timespec format in the variable pointed to by ts.
105+
* in normalized timespec format in the variable pointed to by @ts.
106106
*/
107107
void ktime_get_ts(struct timespec *ts)
108108
{
@@ -583,8 +583,8 @@ EXPORT_SYMBOL_GPL(hrtimer_init);
583583
* @which_clock: which clock to query
584584
* @tp: pointer to timespec variable to store the resolution
585585
*
586-
* Store the resolution of the clock selected by which_clock in the
587-
* variable pointed to by tp.
586+
* Store the resolution of the clock selected by @which_clock in the
587+
* variable pointed to by @tp.
588588
*/
589589
int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp)
590590
{

kernel/kfifo.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* @gfp_mask: get_free_pages mask, passed to kmalloc()
3333
* @lock: the lock to be used to protect the fifo buffer
3434
*
35-
* Do NOT pass the kfifo to kfifo_free() after use ! Simply free the
36-
* struct kfifo with kfree().
35+
* Do NOT pass the kfifo to kfifo_free() after use! Simply free the
36+
* &struct kfifo with kfree().
3737
*/
3838
struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
3939
gfp_t gfp_mask, spinlock_t *lock)
@@ -108,7 +108,7 @@ EXPORT_SYMBOL(kfifo_free);
108108
* @buffer: the data to be added.
109109
* @len: the length of the data to be added.
110110
*
111-
* This function copies at most 'len' bytes from the 'buffer' into
111+
* This function copies at most @len bytes from the @buffer into
112112
* the FIFO depending on the free space, and returns the number of
113113
* bytes copied.
114114
*
@@ -155,8 +155,8 @@ EXPORT_SYMBOL(__kfifo_put);
155155
* @buffer: where the data must be copied.
156156
* @len: the size of the destination buffer.
157157
*
158-
* This function copies at most 'len' bytes from the FIFO into the
159-
* 'buffer' and returns the number of copied bytes.
158+
* This function copies at most @len bytes from the FIFO into the
159+
* @buffer and returns the number of copied bytes.
160160
*
161161
* Note that with only one concurrent reader and one concurrent
162162
* writer, you don't need extra locking to use these functions.

kernel/kthread.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static struct kthread_stop_info kthread_stop_info;
5050
/**
5151
* kthread_should_stop - should this kthread return now?
5252
*
53-
* When someone calls kthread_stop on your kthread, it will be woken
53+
* When someone calls kthread_stop() on your kthread, it will be woken
5454
* and this will return true. You should then return, and your return
5555
* value will be passed through to kthread_stop().
5656
*/
@@ -143,7 +143,7 @@ static void keventd_create_kthread(struct work_struct *work)
143143
* it. See also kthread_run(), kthread_create_on_cpu().
144144
*
145145
* When woken, the thread will run @threadfn() with @data as its
146-
* argument. @threadfn can either call do_exit() directly if it is a
146+
* argument. @threadfn() can either call do_exit() directly if it is a
147147
* standalone thread for which noone will call kthread_stop(), or
148148
* return when 'kthread_should_stop()' is true (which means
149149
* kthread_stop() has been called). The return value should be zero
@@ -192,7 +192,7 @@ EXPORT_SYMBOL(kthread_create);
192192
*
193193
* Description: This function is equivalent to set_cpus_allowed(),
194194
* except that @cpu doesn't need to be online, and the thread must be
195-
* stopped (i.e., just returned from kthread_create().
195+
* stopped (i.e., just returned from kthread_create()).
196196
*/
197197
void kthread_bind(struct task_struct *k, unsigned int cpu)
198198
{

kernel/printk.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static int have_callable_console(void)
483483
* printk - print a kernel message
484484
* @fmt: format string
485485
*
486-
* This is printk. It can be called from any context. We want it to work.
486+
* This is printk(). It can be called from any context. We want it to work.
487487
*
488488
* We try to grab the console_sem. If we succeed, it's easy - we log the output and
489489
* call the console drivers. If we fail to get the semaphore we place the output

kernel/relay.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static void wakeup_readers(struct work_struct *work)
328328
* @buf: the channel buffer
329329
* @init: 1 if this is a first-time initialization
330330
*
331-
* See relay_reset for description of effect.
331+
* See relay_reset() for description of effect.
332332
*/
333333
static void __relay_reset(struct rchan_buf *buf, unsigned int init)
334334
{
@@ -364,7 +364,7 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init)
364364
* and restarting the channel in its initial state. The buffers
365365
* are not freed, so any mappings are still in effect.
366366
*
367-
* NOTE: Care should be taken that the channel isn't actually
367+
* NOTE. Care should be taken that the channel isn't actually
368368
* being used by anything when this call is made.
369369
*/
370370
void relay_reset(struct rchan *chan)
@@ -528,7 +528,7 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
528528
* Creates a channel buffer for each cpu using the sizes and
529529
* attributes specified. The created channel buffer files
530530
* will be named base_filename0...base_filenameN-1. File
531-
* permissions will be S_IRUSR.
531+
* permissions will be %S_IRUSR.
532532
*/
533533
struct rchan *relay_open(const char *base_filename,
534534
struct dentry *parent,
@@ -648,7 +648,7 @@ EXPORT_SYMBOL_GPL(relay_switch_subbuf);
648648
* subbufs_consumed should be the number of sub-buffers newly consumed,
649649
* not the total consumed.
650650
*
651-
* NOTE: Kernel clients don't need to call this function if the channel
651+
* NOTE. Kernel clients don't need to call this function if the channel
652652
* mode is 'overwrite'.
653653
*/
654654
void relay_subbufs_consumed(struct rchan *chan,
@@ -749,7 +749,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
749749
* @filp: the file
750750
* @vma: the vma describing what to map
751751
*
752-
* Calls upon relay_mmap_buf to map the file into user space.
752+
* Calls upon relay_mmap_buf() to map the file into user space.
753753
*/
754754
static int relay_file_mmap(struct file *filp, struct vm_area_struct *vma)
755755
{
@@ -891,7 +891,7 @@ static size_t relay_file_read_subbuf_avail(size_t read_pos,
891891
* @read_pos: file read position
892892
* @buf: relay channel buffer
893893
*
894-
* If the read_pos is in the middle of padding, return the
894+
* If the @read_pos is in the middle of padding, return the
895895
* position of the first actually available byte, otherwise
896896
* return the original value.
897897
*/

kernel/sched.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -4203,13 +4203,12 @@ static void __setscheduler(struct task_struct *p, int policy, int prio)
42034203
}
42044204

42054205
/**
4206-
* sched_setscheduler - change the scheduling policy and/or RT priority of
4207-
* a thread.
4206+
* sched_setscheduler - change the scheduling policy and/or RT priority of a thread.
42084207
* @p: the task in question.
42094208
* @policy: new policy.
42104209
* @param: structure containing the new RT priority.
42114210
*
4212-
* NOTE: the task may be already dead
4211+
* NOTE that the task may be already dead.
42134212
*/
42144213
int sched_setscheduler(struct task_struct *p, int policy,
42154214
struct sched_param *param)
@@ -4577,7 +4576,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
45774576
/**
45784577
* sys_sched_yield - yield the current processor to other threads.
45794578
*
4580-
* this function yields the current CPU by moving the calling thread
4579+
* This function yields the current CPU by moving the calling thread
45814580
* to the expired array. If there are no other threads running on this
45824581
* CPU then this function will return.
45834582
*/
@@ -4704,7 +4703,7 @@ EXPORT_SYMBOL(cond_resched_softirq);
47044703
/**
47054704
* yield - yield the current processor to other threads.
47064705
*
4707-
* this is a shortcut for kernel-space yielding - it marks the
4706+
* This is a shortcut for kernel-space yielding - it marks the
47084707
* thread runnable and calls sys_sched_yield().
47094708
*/
47104709
void __sched yield(void)

0 commit comments

Comments
 (0)