lkml.org 
[lkml]   [2008]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/5] x86: Coding style fixes to arch/x86/kernel/bios_uv.c
    From
    Date
    Stefan Richter <stefanr@s5r6.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


    \
     
     \ /
      Last update: 2008-08-03 13:57    [W:0.024 / U:0.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site