Some (unqualified) changes and extensions to the Kernel documentation
Subsystems (13)
Hello All,
excuse me for taking your time.
I have tried to send patch below to the [email protected], where I think it belongs more than there, but because
there has not been any reaction, I am sending it
to whole community. I have not found who is right
target for DocBook changes in MAINTAINERS.
Please redirect me, to the right list, if you do not like patch there.
I have recompiled Linux kernel 2.6.11.5 documentation for me and our university students again.
The documentation could be extended for more sources which are equipped by structured comments for recent 2.6 kernels. I have tried to proceed with that task.
I have done that more times from 2.6.0 time and it gets boring to do same changes again and again.
Linux kernel compiles after changes for i386 and ARM targets. I have added references to some more files into kernel-api book, I have added some section names as well.
So please, check that changes do not break something and that categories are not too much skewed.
I have changed kernel-doc to accept "fastcall" and "asmlinkage" words reserved by kernel convention.
Most of the other changes are modifications in the comments to make kernel-doc happy, accept some parameters description and do not bail out on errors. Changed <pid> to @pid in the description, moved some #ifdef before comments to correct function to comments bindings, etc.
You can see result of the modified documentation build at
http://cmp.felk.cvut.cz/~pisa/linux/lkdb-2.6.11.tar.gz
Best wishes
Pavel Pisa
e-mail: [email protected]
www: http://cmp.felk.cvut.cz/~pisa
Some more sources are ready to be included into kernel-doc generated documentation. Sources has been added into kernel-api for now. Some more section names added and probably some more chaos introduced as result of quick cleanup work.
---
include/linux/skbuff.h renamed from include/linux/skbuff.h~docbook-fix +1 -1
@@ -921,6 +921,7 @@ static inline void __skb_queue_purge(strkfree_skb (skb); } +#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB /** * __dev_alloc_skb - allocate an skbuff for sending * @length: length to allocate
@@ -933,7 +934,6 @@ static inline void __skb_queue_purge(str* * %NULL is returned in there is no free memory. */ -#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB static inline struct sk_buff *__dev_alloc_skb (unsigned int length,int gfp_mask) {
drivers/video/fbmem.c renamed from drivers/video/fbmem.c~docbook-fix +2 -2
@@ -1248,6 +1248,8 @@ int fb_get_options(char *name, char **opreturn retval; } +extern const char *global_mode_option; +/** * video_setup - process command line options * @options: string of options
@@ -1262,8 +1264,6 @@ int fb_get_options(char *name, char **op* */ -extern const char *global_mode_option; -int __init video_setup (char *options) {int i, global =0 ;
Documentation/DocBook/kernel-api.tmpl renamed from Documentation/DocBook/kernel-api.tmpl~docbook-fix +179 -7
281 lines not on this page · raw message
mm/vmalloc.c renamed from mm/vmalloc.c~docbook-fix +4 -4
@@ -536,6 +536,10 @@ void *vmalloc(unsigned long size)EXPORT_SYMBOL (vmalloc); +#ifndef PAGE_KERNEL_EXEC +# define PAGE_KERNEL_EXEC PAGE_KERNEL +#endif +/** * vmalloc_exec - allocate virtually contiguous, executable memory *
@@ -549,10 +553,6 @@ EXPORT_SYMBOL(vmalloc);* use __vmalloc() instead. */ -#ifndef PAGE_KERNEL_EXEC -# define PAGE_KERNEL_EXEC PAGE_KERNEL -#endif -void *vmalloc_exec (unsigned long size) {return __vmalloc (size,GFP_KERNEL | __GFP_HIGHMEM,PAGE_KERNEL_EXEC );
include/linux/fs.h renamed from include/linux/fs.h~docbook-fix +6 -6
@@ -1051,12 +1051,12 @@ static inline void file_accessed(structint sync_inode (struct inode *inode,struct writeback_control *wbc);/** -* &export_operations - for nfsd to communicate with file systems -* decode_fh: decode a file handle fragment and return a &struct dentry -* encode_fh: encode a file handle fragment from a dentry -* get_name: find the name for a given inode in a given directory -* get_parent: find the parent of a given directory -* get_dentry: find a dentry for the inode given a file handle sub-fragment +* struct export_operations - for nfsd to communicate with file systems +* @decode_fh: decode a file handle fragment and return a &struct dentry +* @encode_fh: encode a file handle fragment from a dentry +* @get_name: find the name for a given inode in a given directory +* @get_parent: find the parent of a given directory +* @get_dentry: find a dentry for the inode given a file handle sub-fragment * * Description: * The export_operations structure provides a means for nfsd to communicate
mm/page_alloc.c renamed from mm/page_alloc.c~docbook-fix +1 -2
@@ -1300,8 +1300,7 @@ static int __init build_zonelists_node(p#define MAX_NODE_LOAD (num_online_nodes())static int __initdata node_load[MAX_NUMNODES ];/** -* find_next_best_node - find the next node that should appear in a given -* node's fallback list +* find_next_best_node - find the next node that should appear in a given node's fallback list * @node: node whose fallback list we're appending * @used_node_mask: nodemask_t of already used nodes *
kernel/power/swsusp.c renamed from kernel/power/swsusp.c~docbook-fix +2 -2
@@ -996,7 +996,7 @@ static int __init swsusp_pagedir_relocatreturn check_pagedir (); } -/** +/* * Using bio to read from swap. * This code requires a bit more work than just using buffer heads * but, it is the recommended way for 2.5/2.6.
@@ -1138,7 +1138,7 @@ static int __init check_sig(void) }/** -* swsusp_read_data - Read image pages from swap. +* read_data - Read image pages from swap. * * You do not need to check for overlaps, check_pagedir() * already did that.
net/sunrpc/xdr.c renamed from net/sunrpc/xdr.c~docbook-fix +6 -6
@@ -46,9 +46,9 @@ xdr_decode_netobj(u32 *p, struct xdr_net/** * xdr_encode_opaque_fixed - Encode fixed length opaque data -* @p - pointer to current position in XDR buffer. -* @ptr - pointer to data to encode (or NULL) -* @nbytes - size of data. +* @p: pointer to current position in XDR buffer. +* @ptr: pointer to data to encode (or NULL) +* @nbytes: size of data. * * Copy the array of data of length nbytes at ptr to the XDR buffer * at position p, then align to the next 32-bit boundary by padding
@@ -76,9 +76,9 @@ EXPORT_SYMBOL(xdr_encode_opaque_fixed);/** * xdr_encode_opaque - Encode variable length opaque data -* @p - pointer to current position in XDR buffer. -* @ptr - pointer to data to encode (or NULL) -* @nbytes - size of data. +* @p: pointer to current position in XDR buffer. +* @ptr: pointer to data to encode (or NULL) +* @nbytes: size of data. * * Returns the updated current XDR buffer position */
net/core/sock.c renamed from net/core/sock.c~docbook-fix +6 -6
@@ -607,10 +607,10 @@ static kmem_cache_t *sk_cachep;/** * sk_alloc - All socket objects are allocated here -* @family - protocol family -* @priority - for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc) -* @zero_it - zeroes the allocated sock -* @slab - alternate slab +* @family: protocol family +* @priority: for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc) +* @zero_it: zeroes the allocated sock +* @slab: alternate slab * * All socket objects are allocated here. If @zero_it is non-zero * it should have the size of the are to be zeroed, because the
@@ -962,8 +962,8 @@ static void __release_sock(struct sock */** * sk_wait_data - wait for data to arrive at sk_receive_queue -* sk - sock to wait on -* timeo - for how long +* @sk: sock to wait on +* @timeo: for how long * * Now socket state including sk->sk_err is changed only under lock, * hence we may omit checks after joining wait queue.
net/core/datagram.c renamed from net/core/datagram.c~docbook-fix +14 -14
@@ -115,10 +115,10 @@ out_noerr:/** * skb_recv_datagram - Receive a datagram skbuff -* @sk - socket -* @flags - MSG_ flags -* @noblock - blocking operation? -* @err - error code returned +* @sk: socket +* @flags: MSG_ flags +* @noblock: blocking operation? +* @err: error code returned * * Get a datagram skbuff, understands the peeking, nonblocking wakeups * and possible races. This replaces identical code in packet, raw and
@@ -201,10 +201,10 @@ void skb_free_datagram(struct sock *sk,/** * skb_copy_datagram_iovec - Copy a datagram to an iovec. -* @skb - buffer to copy -* @offset - offset in the buffer to start copying from -* @iovec - io vector to copy to -* @len - amount of data to copy from buffer to iovec +* @skb: buffer to copy +* @offset: offset in the buffer to start copying from +* @iovec: io vector to copy to +* @len: amount of data to copy from buffer to iovec * * Note: the iovec is modified during the copy. */
@@ -377,9 +377,9 @@ fault:/** * skb_copy_and_csum_datagram_iovec - Copy and checkum skb to user iovec. -* @skb - skbuff -* @hlen - hardware length -* @iovec - io vector +* @skb: skbuff +* @hlen: hardware length +* @iovec: io vector * * Caller _must_ check that skb will fit to this iovec. *
@@ -425,9 +425,9 @@ fault:/** * datagram_poll - generic datagram poll -* @file - file struct -* @sock - socket -* @wait - poll table +* @file: file struct +* @sock: socket +* @wait: poll table * * Datagram poll: Again totally generic. This also handles * sequenced packet sockets providing the socket receive queue
net/core/stream.c renamed from net/core/stream.c~docbook-fix +6 -6
@@ -21,7 +21,7 @@/** * sk_stream_write_space - stream socket write_space callback. -* sk - socket +* @sk: socket * * FIXME: write proper description */
@@ -43,8 +43,8 @@ EXPORT_SYMBOL(sk_stream_write_space);/** * sk_stream_wait_connect - Wait for a socket to get into the connected state -* @sk - sock to wait on -* @timeo_p - for how long to wait +* @sk: sock to wait on +* @timeo_p: for how long to wait * * Must be called with the socket locked. */
@@ -79,7 +79,7 @@ EXPORT_SYMBOL(sk_stream_wait_connect);/** * sk_stream_closing - Return 1 if we still have things to send in our buffers. -* @sk - socket to verify +* @sk: socket to verify */ static inline int sk_stream_closing (struct sock *sk) {
@@ -107,8 +107,8 @@ EXPORT_SYMBOL(sk_stream_wait_close);/** * sk_stream_wait_memory - Wait for more memory for a socket -* @sk - socket to wait for memory -* @timeo_p - for how long +* @sk: socket to wait for memory +* @timeo_p: for how long */ int sk_stream_wait_memory (struct sock *sk,long *timeo_p) {
diff -puN kernel/timer.c~docbook-fix kernel/timer.c
scripts/kernel-doc renamed from scripts/kernel-doc~docbook-fix +2 -0
@@ -1465,6 +1465,8 @@ sub dump_function($$) { $prototype =~ s/^static +//; $prototype =~ s/^extern +//; + $prototype =~ s/^fastcall +//; + $prototype =~ s/^asmlinkage +//; $prototype =~ s/^inline +//; $prototype =~ s/^__inline__ +//; $prototype =~ s/^#define +//; #ak added
diff -puN drivers/acpi/pci_bind.c~docbook-fix drivers/acpi/pci_bind.c
include/net/sock.h renamed from include/net/sock.h~docbook-fix +77 -77
172 lines not on this page · raw message
include/linux/net.h renamed from include/linux/net.h~docbook-fix +19 -19
@@ -63,19 +63,19 @@ typedef enum {#define SOCK_NOSPACE 2#ifndef ARCH_HAS_SOCKET_TYPES -/** sock_type - Socket types -* +/** +* enum sock_type - Socket types +* @SOCK_STREAM: stream (connection) socket +* @SOCK_DGRAM: datagram (conn.less) socket +* @SOCK_RAW: raw socket +* @SOCK_RDM: reliably-delivered message +* @SOCK_SEQPACKET: sequential packet socket +* @SOCK_PACKET: linux specific way of getting packets at the dev level. +* For writing rarp and other similar things on the user level. +* * When adding some new socket type please * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS * overrides this enum for binary compat reasons. -* -* @SOCK_STREAM - stream (connection) socket -* @SOCK_DGRAM - datagram (conn.less) socket -* @SOCK_RAW - raw socket -* @SOCK_RDM - reliably-delivered message -* @SOCK_SEQPACKET - sequential packet socket -* @SOCK_PACKET - linux specific way of getting packets at the dev level. -* For writing rarp and other similar things on the user level. */ enum sock_type { SOCK_STREAM = 1,
@@ -92,15 +92,15 @@ enum sock_type {/** * struct socket - general BSD socket -* @state - socket state (%SS_CONNECTED, etc) -* @flags - socket flags (%SOCK_ASYNC_NOSPACE, etc) -* @ops - protocol specific socket operations -* @fasync_list - Asynchronous wake up list -* @file - File back pointer for gc -* @sk - internal networking protocol agnostic socket representation -* @wait - wait queue for several uses -* @type - socket type (%SOCK_STREAM, etc) -* @passcred - credentials (used only in Unix Sockets (aka PF_LOCAL)) +* @state: socket state (%SS_CONNECTED, etc) +* @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) +* @ops: protocol specific socket operations +* @fasync_list: Asynchronous wake up list +* @file: File back pointer for gc +* @sk: internal networking protocol agnostic socket representation +* @wait: wait queue for several uses +* @type: socket type (%SOCK_STREAM, etc) +* @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL)) */ struct socket {socket_state state;
kernel/exit.c renamed from kernel/exit.c~docbook-fix +1 -1
@@ -208,7 +208,7 @@ static inline int has_stopped_jobs(int p }/** -* reparent_to_init() - Reparent the calling kernel thread to the init task. +* reparent_to_init - Reparent the calling kernel thread to the init task. * * 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
fs/proc/base.c renamed from fs/proc/base.c~docbook-fix +5 -5
@@ -1607,13 +1607,13 @@ static struct inode_operations proc_self };/** -* proc_pid_unhash - Unhash /proc/<pid> entry from the dcache. +* proc_pid_unhash - Unhash /proc/@pid entry from the dcache. * @p: task that should be flushed. * -* Drops the /proc/<pid> dcache entry from the hash chains. +* Drops the /proc/@pid dcache entry from the hash chains. * -* Dropping /proc/<pid> entries and detach_pid must be synchroneous, -* otherwise e.g. /proc/<pid>/exe might point to the wrong executable, +* Dropping /proc/@pid entries and detach_pid must be synchroneous, +* otherwise e.g. /proc/@pid/exe might point to the wrong executable, * if the pid value is immediately reused. This is enforced by * - caller must acquire spin_lock(p->proc_lock) * - must be called before detach_pid()
@@ -1641,7 +1641,7 @@ struct dentry *proc_pid_unhash(struct ta }/** -* proc_pid_flush - recover memory used by stale /proc/<pid>/x entries +* proc_pid_flush - recover memory used by stale /proc/@pid/x entries * @proc_entry: directoy to prune. * * Shrink the /proc directory that was used by the just killed thread.
_