From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbdJETTV (ORCPT ); Thu, 5 Oct 2017 15:19:21 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:53892 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbdJETTT (ORCPT ); Thu, 5 Oct 2017 15:19:19 -0400 X-IronPort-AV: E=Sophos;i="5.42,481,1500933600"; d="scan'208";a="294542955" Date: Thu, 5 Oct 2017 21:19:16 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: Masahiro Yamada , Liam Breck , Sebastian Reichel , =?ISO-8859-15?Q?Pali_Roh=E1r?= , Linux PM mailing list , kernel-janitors@vger.kernel.org, Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, Linux Kernel Mailing List , kbuild test robot Subject: Re: [PATCH] coccinelle: api: detect duplicate chip data arrays In-Reply-To: <1507230959.4434.39.camel@perches.com> Message-ID: References: <1506861768-5734-1-git-send-email-Julia.Lawall@lip6.fr> <1507230959.4434.39.camel@perches.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 Oct 2017, Joe Perches wrote: > On Thu, 2017-10-05 at 21:13 +0200, Julia Lawall wrote: > > > > On Fri, 6 Oct 2017, Masahiro Yamada wrote: > > > > > 2017-10-01 21:42 GMT+09:00 Julia Lawall : > > > > This semantic patch detects duplicate arrays declared using BQ27XXX_DATA > > > > within a single structure. It is currently specific to the file > > > > drivers/power/supply/bq27xxx_battery.c. > > > > > > > > Signed-off-by: Julia Lawall > > > > > > > > --- > > > > > > Applied to linux-kbuild/misc. > > > > Thanks for picking it up. > > If it is specific to one file, why not just run it > and post the resultant patch? Why have it in tree? I guess that they anticipate that the data may change in the future? If id-utils is used, Coccinelle will completely ignore files that don't contain BQ27XXX_DATA, so the rule will have essentially no performance impact. If there is no indexing, it will only "grep" for BQ27XXX_DATA, not actually parse the files that don't contain it. So there is not much performance impact even in that case. julia