Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcDVTKw (ORCPT ); Fri, 22 Apr 2016 15:10:52 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2377 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbcDVTKv (ORCPT ); Fri, 22 Apr 2016 15:10:51 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Fri, 22 Apr 2016 12:10:38 -0700 Subject: Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings To: Julia Lawall References: <571A6BAF.8040006@nvidia.com> CC: Jiang Liu , Marc Zyngier , Thomas Gleixner , , X-Nvconfidentiality: public From: Jon Hunter Message-ID: <571A7733.9070306@nvidia.com> Date: Fri, 22 Apr 2016 20:10:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.26.11.57] X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1435 Lines: 44 On 22/04/16 20:00, Julia Lawall wrote: > On Fri, 22 Apr 2016, Jon Hunter wrote: > >> >> On 20/04/16 17:49, Julia Lawall wrote: >>> Move constants to the right of binary operators. >>> >>> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci >>> >>> Signed-off-by: Fengguang Wu >>> Signed-off-by: Julia Lawall >>> --- >>> >>> Not a big deal, but the transformed code looks better to me. >>> >>> irqdomain.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> --- a/kernel/irq/irqdomain.c >>> +++ b/kernel/irq/irqdomain.c >>> @@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s >>> * If the trigger type has not been set yet, then set >>> * it now and return the interrupt number. >>> */ >>> - if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) { >>> + if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) { >>> irq_set_irq_type(virq, type); >>> return virq; >>> } >> >> What branch is this from? Looks very familiar and related to some >> changes I have been working on, but in my latest version I already have >> this as shown above [0]. > > Sorry, I didn't save that information. If it's done, it's done. Sorry > for the noise. No problem. I am wondering if this was based off an earlier branch on my github tree (as I know that kbuild is trawling these) and I have never posted a patch publicly with the above. Cheers Jon