mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	linux-mtd@lists.infradead.org
Subject: [PATCH 16/30] lzo.txt: standardize document format
Date: Thu, 18 May 2017 22:24:08 -0300	[thread overview]
Message-ID: <09f3c0db7ba32f5523cb0fb0a44becc35c7d53ae.1495156975.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <cover.1495156975.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1495156975.git.mchehab@s-opensource.com>

Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:

- Add markups for section titles;
- mark literal blocks;
- use ".. important::" for an important note.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 Documentation/lzo.txt | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/Documentation/lzo.txt b/Documentation/lzo.txt
index 285c54f66779..6fa6a93d0949 100644
--- a/Documentation/lzo.txt
+++ b/Documentation/lzo.txt
@@ -1,8 +1,9 @@
-
+===========================================================
 LZO stream format as understood by Linux's LZO decompressor
 ===========================================================
 
 Introduction
+============
 
   This is not a specification. No specification seems to be publicly available
   for the LZO stream format. This document describes what input format the LZO
@@ -14,12 +15,13 @@ Introduction
   for future bug reports.
 
 Description
+===========
 
   The stream is composed of a series of instructions, operands, and data. The
   instructions consist in a few bits representing an opcode, and bits forming
   the operands for the instruction, whose size and position depend on the
   opcode and on the number of literals copied by previous instruction. The
-  operands are used to indicate :
+  operands are used to indicate:
 
     - a distance when copying data from the dictionary (past output buffer)
     - a length (number of bytes to copy from dictionary)
@@ -38,7 +40,7 @@ Description
   of bits in the operand. If the number of bits isn't enough to represent the
   length, up to 255 may be added in increments by consuming more bytes with a
   rate of at most 255 per extra byte (thus the compression ratio cannot exceed
-  around 255:1). The variable length encoding using #bits is always the same :
+  around 255:1). The variable length encoding using #bits is always the same::
 
        length = byte & ((1 << #bits) - 1)
        if (!length) {
@@ -67,15 +69,19 @@ Description
   instruction may encode this distance (0001HLLL), it takes one LE16 operand
   for the distance, thus requiring 3 bytes.
 
-  IMPORTANT NOTE : in the code some length checks are missing because certain
-  instructions are called under the assumption that a certain number of bytes
-  follow because it has already been guaranteed before parsing the instructions.
-  They just have to "refill" this credit if they consume extra bytes. This is
-  an implementation design choice independent on the algorithm or encoding.
+  .. important::
+
+     In the code some length checks are missing because certain instructions
+     are called under the assumption that a certain number of bytes follow
+     because it has already been guaranteed before parsing the instructions.
+     They just have to "refill" this credit if they consume extra bytes. This
+     is an implementation design choice independent on the algorithm or
+     encoding.
 
 Byte sequences
+==============
 
-  First byte encoding :
+  First byte encoding::
 
       0..17   : follow regular instruction encoding, see below. It is worth
                 noting that codes 16 and 17 will represent a block copy from
@@ -91,7 +97,7 @@ Byte sequences
                 state = 4 [ don't copy extra literals ]
                 skip byte
 
-  Instruction encoding :
+  Instruction encoding::
 
       0 0 0 0 X X X X  (0..15)
         Depends on the number of literals copied by the last instruction.
@@ -156,6 +162,7 @@ Byte sequences
            distance = (H << 3) + D + 1
 
 Authors
+=======
 
   This document was written by Willy Tarreau <w@1wt.eu> on 2014/07/19 during an
   analysis of the decompression code available in Linux 3.16-rc5. The code is
-- 
2.9.4

  parent reply	other threads:[~2017-05-19  1:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  1:23 [PATCH 00/30] Standardize doc formats - part 2 Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 01/30] iostats.txt: update it to cover recent Kernels Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 02/30] IPMI.txt: standardize document format Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 03/30] IRQ-affinity.txt: " Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 04/30] IRQ-domain.txt: " Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 05/30] irqflags-tracing.txt: " Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 06/30] IRQ.txt: add a markup for its title Mauro Carvalho Chehab
2017-05-19  1:23 ` [PATCH 07/30] isapnp.txt: promote title level Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 08/30] isa.txt: standardize document format Mauro Carvalho Chehab
2017-05-19  2:13   ` William Breathitt Gray
2017-05-19  8:55     ` Mauro Carvalho Chehab
2017-05-19 11:36       ` William Breathitt Gray
2017-05-19  1:24 ` [PATCH 09/30] kernel-per-CPU-kthreads.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 10/30] kobject.txt: " Mauro Carvalho Chehab
2017-05-19  5:35   ` Greg Kroah-Hartman
2017-05-19  1:24 ` [PATCH 11/30] kprobes.txt: " Mauro Carvalho Chehab
2017-05-19 14:38   ` Masami Hiramatsu
2017-05-19  1:24 ` [PATCH 12/30] kref.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 13/30] kselftest.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 14/30] ldm.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 15/30] lockup-watchdogs.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` Mauro Carvalho Chehab [this message]
2017-05-19  1:24 ` [PATCH 17/30] mailbox.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 18/30] memory-barriers.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 19/30] memory-barriers.txt: use literals for variables Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 20/30] memory-hotplug.txt: standardize document format Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 21/30] men-chameleon-bus.txt: " Mauro Carvalho Chehab
2017-05-19  6:59   ` Johannes Thumshirn
2017-05-19  1:24 ` [PATCH 22/30] nommu-mmap.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 23/30] nommu-mmap.txt: don't use all upper case on titles Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 24/30] ntb.txt: standardize document format Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 25/30] numastat.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 26/30] padata.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 27/30] parport-lowlevel.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 28/30] percpu-rw-semaphore.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 29/30] phy.txt: " Mauro Carvalho Chehab
2017-05-19  1:24 ` [PATCH 30/30] pi-futex.txt: " Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09f3c0db7ba32f5523cb0fb0a44becc35c7d53ae.1495156975.git.mchehab@s-opensource.com \
    --to=mchehab@s-opensource.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=corbet@lwn.net \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=mchehab@infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®