Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbbFNHem (ORCPT ); Sun, 14 Jun 2015 03:34:42 -0400 Received: from hofr.at ([212.69.189.236]:43721 "EHLO mail.hofr.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbbFNHeh (ORCPT ); Sun, 14 Jun 2015 03:34:37 -0400 Date: Sun, 14 Jun 2015 09:34:35 +0200 From: Nicholas Mc Guire To: Julia Lawall Cc: Nicholas Mc Guire , Gilles Muller , Nicolas Palix , Michal Marek , Joe Perches , Andy Whitcroft , John Stultz , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC V2] coccinelle: flag constants being passed for jiffies Message-ID: <20150614073435.GA30149@opentech.at> References: <1434128979-2096-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1467 Lines: 42 On Sun, 14 Jun 2015, Julia Lawall wrote: > > +@script:python depends on report@ > > +p << cc.p; > > +timeout << cc.C; > > +@@ > > + > > +if str.isdigit(timeout): > > + if (int(timeout) != 1): > > + msg = "WARNING: timeout (%s) seems HZ dependent" % (timeout) > > + coccilib.report.print_report(p[0], msg) > > The parentheses in the warning messages around the timeouts seem a little > strange to me. > should be \"%s\" I guess - will fix that and the other findings - just waiting for feedback if it makes any sense at all to include something like this. > Otherwise, as a semantic patch, it looks fine. I can't judge the problem > being solved though. > it found aproximately 30 cases in the kernel some of which have been fixed already and none seem to be false postitives - the hardcoded "2" really being the only open issue if those should be counted as false-postitives and filtered. I'm not aware of any case in the kernel where the passing of a jiffies value is intentionally HZ dependent - so I guess atleast warning on this makes sense. Anyway it might also make more sense to put something like this into one of the build-bots rather than push it into mainline for general use. thx! hofrat -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/