Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756061AbYHCLyS (ORCPT ); Sun, 3 Aug 2008 07:54:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753531AbYHCLyI (ORCPT ); Sun, 3 Aug 2008 07:54:08 -0400 Received: from khc.piap.pl ([195.187.100.11]:56036 "EHLO khc.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753141AbYHCLyH (ORCPT ); Sun, 3 Aug 2008 07:54:07 -0400 To: Stefan Richter Cc: "H. Peter Anvin" , Paolo Ciarrocchi , Ingo Molnar , Linux Kernel , tglx Subject: Re: [PATCH 2/5] x86: Coding style fixes to arch/x86/kernel/bios_uv.c References: <20080802212406.047e8ae6@paolo-desktop> <48952DB3.20101@zytor.com> <48958DC2.7070506@s5r6.in-berlin.de> From: Krzysztof Halasa Date: Sun, 03 Aug 2008 13:54:03 +0200 In-Reply-To: <48958DC2.7070506@s5r6.in-berlin.de> (Stefan Richter's message of "Sun\, 03 Aug 2008 12\:51\:46 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1535 Lines: 45 Stefan Richter writes: >>> const char *str; >>> switch (status) { >>> - case 0: str = "Call completed without error"; break; >>> - case -1: str = "Not implemented"; break; >>> - case -2: str = "Invalid argument"; break; >>> - case -3: str = "Call completed with error"; break; >>> - default: str = "Unknown BIOS status code"; break; >>> + case 0: >>> + str = "Call completed without error"; >>> + break; >>> + case -1: >>> + str = "Not implemented"; >>> + break; >>> + case -2: >>> + str = "Invalid argument"; >>> + break; >>> + case -3: >>> + str = "Call completed with error"; >>> + break; >>> + default: >>> + str = "Unknown BIOS status code"; >>> + break; >>> } >>> return str; >>> } >> >> This should be an array in the first place... > > Besides, by following CodingStyle to the letter, it arguably breaks > rather than fixes coding style. The former code was easy enough to > read. Right. The latter is much worse. That's why nobody can trust CodingStyle and/or checkpatch automatically. It's only sane mode of operation is as a help tool for authors and maintainers, to quickly locate _potential_ problems. -- Krzysztof Halasa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/