From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756786AbcIMIq6 (ORCPT ); Tue, 13 Sep 2016 04:46:58 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:34806 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755559AbcIMIq4 (ORCPT ); Tue, 13 Sep 2016 04:46:56 -0400 Date: Tue, 13 Sep 2016 05:46:48 -0300 From: Mauro Carvalho Chehab To: Joe Perches Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , Markus Heiser , Jonathan Corbet , Jani Nikula , LKML , Mauro Carvalho Chehab , Jean Delvare , Manuel =?UTF-8?B?UMOpZ291cmnDqS1Hb25uYXJk?= , Thomas Gardner Subject: Re: [PATCH v2 05/20] docs-rst: CodingStyle.rst: Convert to ReST markup Message-ID: <20160913054648.66968b6d@vento.lan> In-Reply-To: <1473735540.11006.37.camel@perches.com> References: <1473735540.11006.37.camel@perches.com> Organization: Samsung X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 Mon, 12 Sep 2016 19:59:00 -0700 Joe Perches escreveu: > On Mon, 2016-09-12 at 23:17 -0300, Mauro Carvalho Chehab wrote: > > - Fix all chapter identation; > > - add c blocks where needed; > > Assuming this is really useful and people agree with simple > conversions of .txt to .rst (and it does have some use), > there are a couple funky conversions > > if (condition) > do_this(); > else > do_that(); > > do_that() is oddly displayed in the code_block Yeah, Sphinx uses pygments to colorize C blocks, with seems to be buggy. We could use a block of type none, forcing it to not using pygments. The question is: should we do it for just this block, for the entire file or for all ReST files? > > and in the "Spaces" section, the pointer description is wrong > > "\* is adjacent" > > other than that, looks good to me. Thanks for review! The following fixup patch should address the two pointed issues. I took the shortest path: I just avoided highlights at the if/else block that looked odd. If you agree that this is the best solution, I'll fold it with the original patch on a next version of this patchset. Regards, Mauro diff --git a/Documentation/development-process/CodingStyle.rst b/Documentation/development-process/CodingStyle.rst index 510063361b04..56f4a42922ab 100644 --- a/Documentation/development-process/CodingStyle.rst +++ b/Documentation/development-process/CodingStyle.rst @@ -181,7 +181,7 @@ Do not unnecessarily use braces where a single statement will do. and -.. code-block:: c +.. code-block:: none if (condition) do_this(); @@ -232,7 +232,7 @@ Do not add spaces around (inside) parenthesized expressions. This example is s = sizeof( struct file ); When declaring pointer data or a function that returns a pointer type, the -preferred use of ``\*`` is adjacent to the data name or function name and not +preferred use of ``*`` is adjacent to the data name or function name and not adjacent to the type name. Examples: .. code-block:: c Thanks, Mauro