From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41951 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5hdW-0007SR-HA for qemu-devel@nongnu.org; Fri, 01 Apr 2011 12:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5hdQ-0008Vo-Cs for qemu-devel@nongnu.org; Fri, 01 Apr 2011 12:55:45 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:37177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5hdQ-0008VC-7N for qemu-devel@nongnu.org; Fri, 01 Apr 2011 12:55:44 -0400 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p31Gipm8001676 for ; Fri, 1 Apr 2011 10:44:51 -0600 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p31Gtg5f089796 for ; Fri, 1 Apr 2011 10:55:42 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p31H0Y4f023827 for ; Fri, 1 Apr 2011 11:00:35 -0600 Message-ID: <4D96038B.3020703@linux.vnet.ibm.com> Date: Fri, 01 Apr 2011 11:55:39 -0500 From: Michael Roth MIME-Version: 1.0 Subject: Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail References: <1301671255-27717-1-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On 04/01/2011 11:16 AM, Peter Maydell wrote: > On 1 April 2011 16:59, Stefan Hajnoczi wrote: >> On Fri, Apr 1, 2011 at 4:52 PM, Peter Maydell wrote: >>> On 1 April 2011 16:20, Michael Roth wrote: >>>> We also make C99 //comments a warning instead of an error, since they >>>> don't actually violate QEMU's coding guidelines. >>> >>> We should either update the guidelines or fix the script... >> >> There are a whole bunch of // in the codebase. I prefer /* */ but as >> it stands I think // should not even raise a warning. > > I don't care much either, really. I just don't think we should be > introducing random coding standards rules by the back door because > checkpatch happens to complain about them. Whether or not // comments should also be a warning...I'm not sure. It seems like a reasonable "suggestion" to make though, since mixed comment styles makes code look nastier. I could also go either way though... But there *are* some warnings that make sense to complain about without saying "you can't do this", like extern's in .c files: some cases are exceptional. I'd prefer to only document "strict" guidelines, and treat checkpatch.pl warnings ("suggestions") as an extra "reward" you get for taking the time to run it. > > -- PMM