From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwAYK-0002PH-Nn for qemu-devel@nongnu.org; Tue, 19 Feb 2019 13:55:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwAYI-0008Mp-RU for qemu-devel@nongnu.org; Tue, 19 Feb 2019 13:55:36 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwAYI-0008MN-KI for qemu-devel@nongnu.org; Tue, 19 Feb 2019 13:55:34 -0500 Received: by mail-wr1-f66.google.com with SMTP id f14so23252793wrg.1 for ; Tue, 19 Feb 2019 10:55:34 -0800 (PST) References: <20190219013106.17538-1-richardw.yang@linux.intel.com> <20190219013106.17538-3-richardw.yang@linux.intel.com> <77cf32b1-6a4a-33c5-4b3c-8ba3245a4b23@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <2e584c55-5b40-4a29-b0ae-e53039e38a7d@redhat.com> Date: Tue, 19 Feb 2019 19:55:31 +0100 MIME-Version: 1.0 In-Reply-To: <77cf32b1-6a4a-33c5-4b3c-8ba3245a4b23@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Wei Yang , qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: imammedo@redhat.com, mjt@tls.msk.ru On 2/19/19 6:56 PM, Eric Blake wrote: > On 2/19/19 11:38 AM, Philippe Mathieu-Daudé wrote: > >>> + if (a == 1) { >>> + /* Reads like: "If a equals 1" */ >> >> I guess you found a bug in the documentation :) >> >> Since 8c06fbdf36bf4d the style asked is: >> >> We now require Linux-kernel-style multiline comments: >> /* >> * line one >> * line two >> */ >> >>> + do_something(); > > We only require winged multiline comments when the comment is actually > multiline. In this case, the comment is a one-liner, and is just fine > as written. Hmm I have a series where I moved code and changed from /* one line */ to the multi-line style, I wonder why and remember checkpatch errors. Maybe a side-effect from what b94e809d3e fixed. Anyway, Wei do you mind adding a multi-line example here too? With/without multi-line example: Reviewed-by: Philippe Mathieu-Daudé Thanks! Phil.