lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3iquigvqc.fsf@maximus.localdomain>
Date:	Sun, 03 Aug 2008 13:54:03 +0200
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Paolo Ciarrocchi <paolo.ciarrocchi@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	tglx <tglx@...utronix.de>
Subject: Re: [PATCH 2/5] x86: Coding style fixes to arch/x86/kernel/bios_uv.c

Stefan Richter <stefanr@...6.in-berlin.de> 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ