On Fri, 2014-09-26 at 13:14 +0200, Michal Kazior wrote:
> On 26 September 2014 13:06, Kalle Valo <kv...@qca.qualcomm.com> wrote:
> > drivers/net/wireless/ath/ath10k/wmi.c:1513: WARNING: else is not generally 
> > useful after a break or return
> I'm aware of this one but the code looks nicer with the `else` to me though.

Yay Michal.

Always use your taste over any mindless style tool.

Ignore any checkpatch complaint you want.

btw: checkpatch shouldn't warn about this as of:

commit adefeef310ee8bd3923d41b67bc53c398bc53621
Author: Joe Perches <j...@perches.com>
Date:   Fri Sep 26 10:19:29 2014 +1000

    checkpatch: add exception to return then else test
    
    Add an exception to the return before else warning
    when the line following it is also a return like:
    
        if (foo)
                return bar;
        else
                return baz;
    
    This form of a test then return is at least as readable as
    
        if (foo)
                return bar;
        return baz;
    
    so don't emit a warning on the first form.
    
    Signed-off-by: Joe Perches <j...@perches.com>
    Reported-by: Al Viro <v...@zeniv.linux.org.uk>
    Cc: Elshad Mustafayev <elshad...@gmail.com>
    Signed-off-by: Andrew Morton <a...@linux-foundation.org>


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to