Return-path: Received: from smtprelay0039.hostedemail.com ([216.40.44.39]:35688 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754696AbaIZOO0 (ORCPT ); Fri, 26 Sep 2014 10:14:26 -0400 Message-ID: <1411740861.19443.6.camel@joe-AO725> (sfid-20140926_161430_052108_E3225D90) Subject: Re: [PATCH 0/4] ath10k: fix/cleanup fw stats From: Joe Perches To: Michal Kazior Cc: Kalle Valo , "ath10k@lists.infradead.org" , linux-wireless Date: Fri, 26 Sep 2014 07:14:21 -0700 In-Reply-To: References: <1411641230-18785-1-git-send-email-michal.kazior@tieto.com> <871tqy63p9.fsf@kamboji.qca.qualcomm.com> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Fri, 2014-09-26 at 13:14 +0200, Michal Kazior wrote: > On 26 September 2014 13:06, Kalle Valo 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 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 Reported-by: Al Viro Cc: Elshad Mustafayev Signed-off-by: Andrew Morton