From: Rusty Russell From: Hans Ulrich Niedermann doc patch: Consistently use quotes for SGML attributes This makes it possible to process the SGML files without SHORTTAG YES. --- 25-akpm/Documentation/DocBook/kernel-hacking.tmpl | 66 +++++++++++----------- 25-akpm/Documentation/DocBook/kernel-locking.tmpl | 26 ++++---- 25-akpm/Documentation/DocBook/mousedrivers.tmpl | 4 - 25-akpm/Documentation/DocBook/parportbook.tmpl | 10 +-- 25-akpm/Documentation/DocBook/sis900.tmpl | 2 25-akpm/Documentation/DocBook/via-audio.tmpl | 24 ++++---- 25-akpm/Documentation/DocBook/videobook.tmpl | 64 ++++++++++----------- 7 files changed, 98 insertions(+), 98 deletions(-) diff -puN Documentation/DocBook/kernel-hacking.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/kernel-hacking.tmpl --- 25/Documentation/DocBook/kernel-hacking.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.203200664 -0800 +++ 25-akpm/Documentation/DocBook/kernel-hacking.tmpl 2004-04-03 03:00:00.217198536 -0800 @@ -204,11 +204,11 @@ - include/linux/interrupt.h lists the + include/linux/interrupt.h lists the different BH's. No matter how many CPUs you have, no two BHs will run at the same time. This made the transition to SMP simpler, but sucks hard for scalable performance. A very important bottom half is the timer - BH (include/linux/timer.h): you + BH (include/linux/timer.h): you can register to have it call functions for you in a given length of time. @@ -224,7 +224,7 @@ - tasklets (include/linux/interrupt.h) + tasklets (include/linux/interrupt.h) are like softirqs, except they are dynamically-registrable (meaning you can have as many as you want), and they also guarantee that any tasklet will only run on one CPU at any time, although different tasklets can @@ -241,7 +241,7 @@ You can tell you are in a softirq (or bottom half, or tasklet) using the in_softirq() macro - (include/asm/hardirq.h). + (include/asm/hardirq.h). @@ -330,7 +330,7 @@ asmlinkage long sys_mycall(int arg) You create a character device and implement an appropriate ioctl for it. This is much more flexible than system calls, doesn't have to be entered in every architecture's - include/asm/unistd.h and + include/asm/unistd.h and arch/kernel/entry.S file, and is much more likely to be accepted by Linus. @@ -343,7 +343,7 @@ asmlinkage long sys_mycall(int arg) Inside the ioctl you're in user context to a process. When a error occurs you return a negated errno (see - include/linux/errno.h), + include/linux/errno.h), otherwise you return 0. @@ -429,7 +429,7 @@ cond_resched(); /* Will sleep */ <function>printk()</function> - <filename class=headerfile>include/linux/kernel.h</filename> + <filename class="headerfile">include/linux/kernel.h</filename> @@ -447,7 +447,7 @@ printk(KERN_INFO "i = %u\n", i); - See include/linux/kernel.h; + See include/linux/kernel.h; for other KERN_ values; these are interpreted by syslog as the level. Special case: for printing an IP address use @@ -487,7 +487,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", get_user() / put_user() - include/asm/uaccess.h + include/asm/uaccess.h @@ -525,7 +525,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>kmalloc()</function>/<function>kfree()</function> - <filename class=headerfile>include/linux/slab.h</filename> + include/linux/slab.h [MAY SLEEP: SEE BELOW] @@ -593,10 +593,10 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", If you are allocating at least PAGE_SIZE - (include/asm/page.h) bytes, + (include/asm/page.h) bytes, consider using __get_free_pages() - (include/linux/mm.h). It + (include/linux/mm.h). It takes an order argument (0 for page sized, 1 for double page, 2 for four pages etc.) and the same memory priority flag word as above. @@ -619,13 +619,13 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", Before inventing your own cache of often-used objects consider using a slab cache in - include/linux/slab.h + include/linux/slab.h <function>current</function> - <filename class=headerfile>include/asm/current.h</filename> + include/asm/current.h This global variable (really a macro) contains a pointer to @@ -638,8 +638,8 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>udelay()</function>/<function>mdelay()</function> - <filename class=headerfile>include/asm/delay.h</filename> - <filename class=headerfile>include/linux/delay.h</filename> + <filename class="headerfile">include/asm/delay.h</filename> + <filename class="headerfile">include/linux/delay.h</filename> @@ -652,7 +652,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>cpu_to_be32()</function>/<function>be32_to_cpu()</function>/<function>cpu_to_le32()</function>/<function>le32_to_cpu()</function> - <filename class=headerfile>include/asm/byteorder.h</filename> + <filename class="headerfile">include/asm/byteorder.h</filename> @@ -675,7 +675,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>local_irq_save()</function>/<function>local_irq_restore()</function> - <filename class=headerfile>include/asm/system.h</filename> + <filename class="headerfile">include/asm/system.h</filename> @@ -690,7 +690,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>local_bh_disable()</function>/<function>local_bh_enable()</function> - <filename class=headerfile>include/linux/interrupt.h</filename> + include/linux/interrupt.h These routines disable soft interrupts on the local CPU, and @@ -703,7 +703,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>smp_processor_id</function>() - <filename class=headerfile>include/asm/smp.h</filename> + include/asm/smp.h smp_processor_id() returns the current @@ -715,7 +715,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <type>__init</type>/<type>__exit</type>/<type>__initdata</type> - <filename class=headerfile>include/linux/init.h</filename> + include/linux/init.h After boot, the kernel frees up a special section; functions @@ -738,7 +738,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>__initcall()</function>/<function>module_init()</function> - <filename class=headerfile>include/linux/init.h</filename> + include/linux/init.h Many parts of the kernel are well served as a module (dynamically-loadable parts of the kernel). Using the @@ -768,7 +768,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>module_exit()</function> - <filename class=headerfile>include/linux/init.h</filename> + include/linux/init.h This macro defines the function to be called at module removal @@ -781,7 +781,7 @@ printk(KERN_INFO "my ip: %d.%d.%d.%d\n", <function>MOD_INC_USE_COUNT</function>/<function>MOD_DEC_USE_COUNT</function> - <filename class=headerfile>include/linux/module.h</filename> + include/linux/module.h These manipulate the module usage count, to protect against @@ -839,7 +839,7 @@ foo_open (...) Wait Queues - <filename class=headerfile>include/linux/wait.h</filename> + <filename class="headerfile">include/linux/wait.h</filename> [SLEEPS] @@ -874,7 +874,7 @@ foo_open (...) There is a macro to do this: wait_event_interruptible() - include/linux/sched.h The + include/linux/sched.h The first argument is the wait queue head, and the second is an expression which is evaluated; the macro returns 0 when this expression is true, or @@ -900,7 +900,7 @@ foo_open (...) Call wake_up() - include/linux/sched.h;, + include/linux/sched.h;, which will wake up every process in the queue. The exception is if one has TASK_EXCLUSIVE set, in which case the remainder of the queue will not be woken. @@ -915,7 +915,7 @@ foo_open (...) Certain operations are guaranteed atomic on all platforms. The first class of operations work on atomic_t - include/asm/atomic.h; this + include/asm/atomic.h; this contains a signed integer (at least 24 bits long), and you must use these functions to manipulate or read atomic_t variables. atomic_read() and @@ -943,7 +943,7 @@ foo_open (...) The second class of atomic operations is atomic bit operations on a long, defined in - include/asm/bitops.h. These + include/asm/bitops.h. These operations generally take a pointer to the bit pattern, and a bit number: 0 is the least significant bit. set_bit(), clear_bit() @@ -982,7 +982,7 @@ foo_open (...) <function>EXPORT_SYMBOL()</function> - <filename class=headerfile>include/linux/module.h</filename> + include/linux/module.h This is the classic method of exporting a symbol, and it works @@ -995,7 +995,7 @@ foo_open (...) <function>EXPORT_SYMBOL_GPL()</function> - <filename class=headerfile>include/linux/module.h</filename> + include/linux/module.h Similar to EXPORT_SYMBOL() except that the @@ -1012,7 +1012,7 @@ foo_open (...) Double-linked lists - <filename class=headerfile>include/linux/list.h</filename> + include/linux/list.h There are three sets of linked-list routines in the kernel @@ -1039,7 +1039,7 @@ foo_open (...) The filesystem code uses ERR_PTR() - include/linux/fs.h; to + include/linux/fs.h; to encode a negative error number into a pointer, and IS_ERR() and PTR_ERR() to get it back out again: avoids a separate pointer parameter for diff -puN Documentation/DocBook/kernel-locking.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/kernel-locking.tmpl --- 25/Documentation/DocBook/kernel-locking.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.205200360 -0800 +++ 25-akpm/Documentation/DocBook/kernel-locking.tmpl 2004-04-03 03:00:00.220198080 -0800 @@ -87,7 +87,7 @@ Expected Results - + @@ -133,7 +133,7 @@
Possible Results - + Instance 1 @@ -222,14 +222,14 @@ There are two main types of kernel locks. The fundamental type is the spinlock - (include/asm/spinlock.h), + (include/asm/spinlock.h), which is a very simple single-holder lock: if you can't get the spinlock, you keep trying (spinning) until you can. Spinlocks are very small and fast, and can be used anywhere. The second type is a semaphore - (include/asm/semaphore.h): it + (include/asm/semaphore.h): it can have more than one holder at any time (the number decided at initialization time), although it is most commonly used as a single-holder lock (a mutex). If you can't get a semaphore, @@ -315,7 +315,7 @@ user context can be interrupted by a softirq, and secondly, the critical region could be entered from another CPU. This is where spin_lock_bh() - (include/linux/spinlock.h) is + (include/linux/spinlock.h) is used. It disables softirqs on that CPU, then grabs the lock. spin_unlock_bh() does the reverse. (The '_bh' suffix is a historical reference to "Bottom Halves", the @@ -333,7 +333,7 @@ This works perfectly for UP as well: the spin lock vanishes, and this macro simply becomes local_bh_disable() - (include/linux/interrupt.h), which + (include/linux/interrupt.h), which protects you from the softirq being run. @@ -463,7 +463,7 @@ This works perfectly for UP as well: the spin lock vanishes, and this macro simply becomes local_irq_disable() - (include/asm/smp.h), which + (include/asm/smp.h), which protects you from the softirq/tasklet/BH being run. @@ -545,7 +545,7 @@
Table of Locking Requirements - + @@ -1026,7 +1026,7 @@ In practice, atomic_t would refcnt. There are a number of atomic operations defined in -include/asm/atomic.h: these are +include/asm/atomic.h: these are guaranteed to be seen atomically from all CPUs in the system, so no lock is required. In this case, it is simpler than using spinlocks, although for anything non-trivial using spinlocks is clearer. The @@ -1296,7 +1296,7 @@ as Alan Cox says, Lock data, not
Consequences - + @@ -1437,7 +1437,7 @@ as Alan Cox says, Lock data, not themselves (by calling add_timer() at the end of their timer function). Because this is a fairly common case which is prone to races, you should use del_timer_sync() - (include/linux/timer.h) + (include/linux/timer.h) to handle this case. It returns the number of times the timer had to be deleted before we finally stopped it from adding itself back in. @@ -1749,7 +1749,7 @@ machines due to caching. an exclusive lock. See DEFINE_PER_CPU(), get_cpu_var() and put_cpu_var() - (include/linux/percpu.h). + (include/linux/percpu.h). @@ -1757,7 +1757,7 @@ machines due to caching. local_t type, and the cpu_local_inc() and related functions, which are more efficient than simple code on some architectures - (include/asm/local.h). + (include/asm/local.h). diff -puN Documentation/DocBook/mousedrivers.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/mousedrivers.tmpl --- 25/Documentation/DocBook/mousedrivers.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.206200208 -0800 +++ 25-akpm/Documentation/DocBook/mousedrivers.tmpl 2004-04-03 03:00:00.221197928 -0800 @@ -88,9 +88,9 @@ Each read from a bus mouse interface device returns a block of data. The first three bytes of each read are defined as follows: -
+
Mouse Data Encoding - + Byte 0 diff -puN Documentation/DocBook/parportbook.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/parportbook.tmpl --- 25/Documentation/DocBook/parportbook.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.208199904 -0800 +++ 25-akpm/Documentation/DocBook/parportbook.tmpl 2004-04-03 03:00:00.224197472 -0800 @@ -969,7 +969,7 @@ port->ops->write_data (port, d); To recap, then: - + @@ -1387,7 +1387,7 @@ struct parport_operations { /dev/parport0) allows you to: - + @@ -1614,7 +1614,7 @@ struct parport_operations { incluce/linux/parport.h and include: - + IEEE1284_MODE_COMPAT @@ -1713,7 +1713,7 @@ struct parport_operations { affect future I/O operations. Available flags are: - + PP_FASTWRITE @@ -1759,7 +1759,7 @@ struct parport_operations { include/linux/parport.h: - + PARPORT_CONTROL_STROBE diff -puN Documentation/DocBook/sis900.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/sis900.tmpl --- 25/Documentation/DocBook/sis900.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.209199752 -0800 +++ 25-akpm/Documentation/DocBook/sis900.tmpl 2004-04-03 03:00:00.224197472 -0800 @@ -336,7 +336,7 @@ Those packages are listed in Document/Ch distribution. If you have to install the driver other than those bundled in kernel release, you should have your driver file sis900.c and sis900.h -copied into /usr/src/linux/drivers/net/ first. +copied into /usr/src/linux/drivers/net/ first. There are two alternative ways to install the driver diff -puN Documentation/DocBook/via-audio.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/via-audio.tmpl --- 25/Documentation/DocBook/via-audio.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.210199600 -0800 +++ 25-akpm/Documentation/DocBook/via-audio.tmpl 2004-04-03 03:00:00.226197168 -0800 @@ -227,7 +227,7 @@ Version 1.9.1 - + DSP read/write bugfixes from Thomas Sailer. @@ -252,7 +252,7 @@ Version 1.9.1 Version 1.1.15 - + Support for variable fragment size and variable fragment number (Rui @@ -325,7 +325,7 @@ Version 1.1.15 Version 1.1.14 - + Use VM_RESERVE when available, to eliminate unnecessary page faults. @@ -337,7 +337,7 @@ Version 1.1.14 Version 1.1.12 - + mmap bug fixes from Linus. @@ -349,7 +349,7 @@ Version 1.1.12 Version 1.1.11 - + Many more bug fixes. mmap enabled by default, but may still be buggy. @@ -368,7 +368,7 @@ Version 1.1.11 Version 1.1.10 - + Many bug fixes. mmap enabled by default, but may still be buggy. @@ -380,7 +380,7 @@ Version 1.1.10 Version 1.1.9 - + Redesign and rewrite audio playback implementation. (faster and smaller, hopefully) @@ -478,7 +478,7 @@ Version 1.1.9 Version 1.1.8 - + Clean up interrupt handler output. Fixes the following kernel error message: @@ -501,7 +501,7 @@ Version 1.1.8 Version 1.1.7 - + Fix module unload bug where mixer device left registered @@ -514,7 +514,7 @@ Version 1.1.7 Version 1.1.6 - + Rewrite via_set_rate to mimic ALSA basic AC97 rate setting @@ -546,7 +546,7 @@ Version 1.1.6 Version 1.1.5 - + Disable some overly-verbose debugging code @@ -573,7 +573,7 @@ Version 1.1.5 Version 1.1.4 - + Completed rewrite of driver. Eliminated SoundBlaster compatibility diff -puN Documentation/DocBook/videobook.tmpl~docbook-sgml-quotes-fix Documentation/DocBook/videobook.tmpl --- 25/Documentation/DocBook/videobook.tmpl~docbook-sgml-quotes-fix 2004-04-03 03:00:00.212199296 -0800 +++ 25-akpm/Documentation/DocBook/videobook.tmpl 2004-04-03 03:00:00.228196864 -0800 @@ -176,8 +176,8 @@ int __init myradio_init(struct video_ini The types available are -
Device Types - +
Device Types + VFL_TYPE_RADIO/dev/radio{n} @@ -299,8 +299,8 @@ static int radio_ioctl(struct video_devi allows the applications to find out what sort of a card they have found and to figure out what they want to do about it. The fields in the structure are -
struct video_capability fields - +
struct video_capability fields + nameThe device text name. This is intended for the user. @@ -373,8 +373,8 @@ static int radio_ioctl(struct video_devi The video_tuner structure has the following fields -
struct video_tuner fields - +
struct video_tuner fields + int tunerThe number of the tuner in question @@ -406,8 +406,8 @@ static int radio_ioctl(struct video_devi
- struct video_tuner flags - +
struct video_tuner flags + VIDEO_TUNER_PALA PAL TV tuner @@ -429,8 +429,8 @@ static int radio_ioctl(struct video_devi
- struct video_tuner modes - +
struct video_tuner modes + VIDEO_MODE_PALPAL Format @@ -580,8 +580,8 @@ static int current_volume=0; Then we fill in the video_audio structure. This has the following format -
struct video_audio fields - +
struct video_audio fields + audioThe input the user wishes to query @@ -615,8 +615,8 @@ static int current_volume=0;
- struct video_audio flags - +
struct video_audio flags + VIDEO_AUDIO_MUTEThe audio is currently muted. We @@ -633,8 +633,8 @@ static int current_volume=0;
- struct video_audio modes - +
struct video_audio modes + VIDEO_SOUND_MONOMono sound @@ -862,8 +862,8 @@ static struct video_device my_camera We use the extra video capability flags that did not apply to the radio interface. The video related flags are -
Capture Capabilities - +
Capture Capabilities + VID_TYPE_CAPTUREWe support image capture @@ -1204,8 +1204,8 @@ static int camera_ioctl(struct video_dev inputs to the video card). Our example card has a single camera input. The fields in the structure are -
struct video_channel fields - +
struct video_channel fields + @@ -1227,8 +1227,8 @@ static int camera_ioctl(struct video_dev
- struct video_channel flags - +
struct video_channel flags + VIDEO_VC_TUNERChannel has a tuner. @@ -1238,8 +1238,8 @@ static int camera_ioctl(struct video_dev
- struct video_channel types - +
struct video_channel types + VIDEO_TYPE_TVTelevision input. @@ -1251,8 +1251,8 @@ static int camera_ioctl(struct video_dev
- struct video_channel norms - +
struct video_channel norms + VIDEO_MODE_PALPAL encoded Television @@ -1337,8 +1337,8 @@ static int camera_ioctl(struct video_dev for every other pixel in the image. The other common formats the interface defines are -
Framebuffer Encodings - +
Framebuffer Encodings + GREYLinear greyscale. This is for simple cameras and the @@ -1475,8 +1475,8 @@ static struct video_buffer capture_fb; display. The video_window structure is used to describe the way the image should be displayed. -
struct video_window fields - +
struct video_window fields + widthThe width in pixels of the desired image. The card @@ -1512,8 +1512,8 @@ static struct video_buffer capture_fb; Each clip is a struct video_clip which has the following fields -
video_clip fields - +
video_clip fields + x, yCo-ordinates relative to the display _