Received: by 10.213.65.68 with SMTP id h4csp1338135imn; Wed, 21 Mar 2018 08:18:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELveA53Le2huUxgkzcgDMLzT2sUDpX6v7Gonmc+OK0O5HyogK63NjVS3rvaFSwNjsotM8RVn X-Received: by 10.99.95.144 with SMTP id t138mr14841679pgb.94.1521645501942; Wed, 21 Mar 2018 08:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521645501; cv=none; d=google.com; s=arc-20160816; b=zORta8o6E6BhyNYnsTROydlqjlPWu7mmCwaa4xT+snoRTBo4p0AeYTQlDg68VaaHpd U2ghmfxtE7Kr7Stq/FN+3qcf40n9n0r0XYNgO84rvaA0T5z7+if1XNTFkc6aPU0rxxgu e40grT7L6yMiIs5qhhLptD/gxmaAmr/DpDnKrSwg5mL9lZ5lz+2ZDTEfmftdArnEf6dN XKQeDguKGwnLvSRbBqnP5kKioqzKbdXqD/WX97Te1bJI/lyVQGqEWOdklCyiG923rQYj eh8x61M322l8DH1p7lCJpCefGjPNxCLK1y9BZHEuq9SVLiJ4z6DdB803Hh1MVLkgGzjn sr+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=3M9/xdMGwqcf1x4qiF/I2rNa2f7TkjxQvmzD9IwX3/I=; b=EKXiN9IySkxsFO3z9lRBMZRV1UNtJF7TrGwqxd4dsxwePMAZNr0e9LudXQDzvH1nFW Q+/7hAhWvyQZklhDdLcVPS9P009SgvO0XiyNICyYAsz9auB96D9qtKujs6XfvErTgdmV L3CfOWZWpejIMuRJrUlnt7EjpVI2yGWvhzvdaKmNEH6ruGTnXkSjnUFOhVsb6BZpgxD+ L0liPn9HB+Ehicf+Jk0ky2DeM//E4u4KkxPo7ynmIQXiHwKNYzESX3mpX2WNUExnmr/6 +vhCoPh1yZcS1IkDZMnllOOatabc7NWyvlGs+DKlaFfA7+RSnfR36DapgNGhJ5v9xbbF 4FwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a60-v6si3984100pli.13.2018.03.21.08.18.07; Wed, 21 Mar 2018 08:18:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbeCUPRG (ORCPT + 99 others); Wed, 21 Mar 2018 11:17:06 -0400 Received: from ms.lwn.net ([45.79.88.28]:50008 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbeCUPRD (ORCPT ); Wed, 21 Mar 2018 11:17:03 -0400 Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id DA47A536; Wed, 21 Mar 2018 15:17:02 +0000 (UTC) Date: Wed, 21 Mar 2018 09:17:01 -0600 From: Jonathan Corbet To: Gary R Hook Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jani Nikula Subject: Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces Message-ID: <20180321091701.7d56445d@lwn.net> In-Reply-To: <152114372879.3142.8833111074324091904.stgit@taos> References: <152114372879.3142.8833111074324091904.stgit@taos> Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Mar 2018 15:04:02 -0500 Gary R Hook wrote: > +Do use braces when a body is more complex than a single simple statement: > + > +.. code-block:: c > + > + if (condition) { > + if (another_condition) > + do_something(); > + } Somebody is sure to complain at some point that this should really be: if (condition && another_condition) do_something(); To head that off, I think I'll apply your first version instead, sorry Jani. In general I'm pretty reluctant to apply coding-style patches for the simple reason that I sure don't want to be the arbitrator of proper kernel style. This one seems to fit well within the accepted norms, though. Thanks, jon