From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754061AbbHLPFU (ORCPT ); Wed, 12 Aug 2015 11:05:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:60730 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbbHLPFS (ORCPT ); Wed, 12 Aug 2015 11:05:18 -0400 Subject: Re: [RFC] coccinelle: add style check for assignment in if To: Kris Borer References: <1439387500-11183-1-git-send-email-kborer@gmail.com> <55CB543A.70007@suse.cz> Cc: Julia Lawall , Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr From: Michal Marek Message-ID: <55CB60AC.3@suse.cz> Date: Wed, 12 Aug 2015 17:05:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015-08-12 16:53, Kris Borer wrote: > On Wed, Aug 12, 2015 at 10:12 AM, Michal Marek > wrote: > > On 2015-08-12 15:51, Kris Borer wrote: > > Add a semantic patch for fixing some cases of checkpatch.pl error: > > > > ERROR: do not use assignment in if condition > > There is a gcc warning for this already. > > Michal > > > ​My intention was not to create another way to uncover problems but > rather to ​provide a tool for people to use to fix them. Let me know if > I am misunderstanding the purpose of this subsystem. OK, so this is fixing a style issue, and not cases of accidental assignment instead of '==' (for which there is a gcc warning and we hopefully do not have such errors in the kernel). While I'm probably ignorant and no not see how one style is better than the other, I see that some maintainers already applied your patches based on this check. So I'll merge it once Julia acks it. P.S.: Please switch of HTML email, otherwise vger.kernel.org won't accept your messages. Michal