From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756447AbdESU2P (ORCPT ); Fri, 19 May 2017 16:28:15 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:48220 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756141AbdESU2L (ORCPT ); Fri, 19 May 2017 16:28:11 -0400 Date: Fri, 19 May 2017 17:28:01 -0300 From: Mauro Carvalho Chehab To: Joe Perches Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , linux-mtd@lists.infradead.org Subject: Re: [PATCH 04/29] printk-formats.txt: standardize document format Message-ID: <20170519172801.042a238e@vela.lan> In-Reply-To: <1495189568.31562.34.camel@perches.com> References: <6c973f1a04299e7f637949f717ea7f6c9777b0b4.1495157082.git.mchehab@s-opensource.com> <1495189568.31562.34.camel@perches.com> Organization: Samsung X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 19 May 2017 03:26:08 -0700 Joe Perches escreveu: > On Thu, 2017-05-18 at 22:25 -0300, Mauro Carvalho Chehab wrote: > > 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 a title for the document; > > - add markups for section titles; > > - move authorship to the beginning and use :Author:; > > - use right markup for tables; > > - mark literals and literal blocks. > > I think the .rst markup is far uglier to read as text > and harder to modify for new additions to %p > given column alignments. > > For instance below, but other than that, the .rst > is easier to read. > > > diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt > [] > > @@ -1,139 +1,180 @@ > > -If variable is of Type, use printk format specifier: > > ---------------------------------------------------------- > > - int %d or %x > > - unsigned int %u or %x > > - long %ld or %lx > > - unsigned long %lu or %lx > > - long long %lld or %llx > > - unsigned long long %llu or %llx > > - size_t %zu or %zx > > - ssize_t %zd or %zx > > - s32 %d or %x > > - u32 %u or %x > > - s64 %lld or %llx > > - u64 %llu or %llx > [] > > +======================= =========================== > > +If variable is of Type use printk format specifier > > +======================= =========================== > > +``int`` ``%d or %x`` > > +``unsigned int`` ``%u or %x`` > > +``long`` ``%ld or %lx`` > > +``unsigned long`` ``%lu or %lx`` > > +``long long`` ``%lld or %llx`` > > +``unsigned long long`` ``%llu or %llx`` > > +``size_t`` ``%zu or %zx`` > > +``ssize_t`` ``%zd or %zx`` > > +``s32`` ``%d or %x`` > > +``u32`` ``%u or %x`` > > +``s64`` ``%lld or %llx`` > > +``u64`` ``%llu or %llx`` > > +======================= =========================== Well, we could,instead, use literal blocks, e. g. something like: :: -If variable is of Type, use printk format specifier: ---------------------------------------------------------- - int %d or %x - unsigned int %u or %x - long %ld or %lx - unsigned long %lu or %lx - long long %lld or %llx - unsigned long long %llu or %llx - size_t %zu or %zx - ssize_t %zd or %zx - s32 %d or %x - u32 %u or %x - s64 %lld or %llx - u64 %llu or %llx Cheers, Mauro