From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Marek Date: Thu, 03 Jun 2010 09:51:43 +0000 Subject: Re: [PATCH 3/4] Add scripts/coccinelle/kzalloc-simple.cocci Message-Id: <4C077B2F.8010204@suse.cz> List-Id: References: <1273508667-5152-1-git-send-email-npalix@diku.dk> <1273508667-5152-4-git-send-email-npalix@diku.dk> In-Reply-To: <1273508667-5152-4-git-send-email-npalix@diku.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Nicolas Palix Cc: Randy Dunlap , Roland Dreier , Joe Perches , Andrew Morton , "David S. Miller" , Sam Ravnborg , Julia Lawall , Gilles Muller , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, cocci@diku.dk, Wolfram Sang , Kernel Janitors On 10.5.2010 18:24, Nicolas Palix wrote: > +@script:python depends on org@ > +p << r.p; > +x << r.x; > +@@ > + > +msg="%s" % (x) > +msg_safe=msg.replace("[","@(").replace("]",")") > +coccilib.org.print_todo(p[0], msg_safe) > + > +@script:python depends on report@ > +p << r.p; > +x << r.x; > +@@ > + > +msg="WARNING: kzalloc should be used for %s, instead of kmalloc/memset" % (x) > +coccilib.report.print_report(p[0], msg_safe) msg_safe is not defined in this scriptlet, I'm only getting Traceback (most recent call last): File "", line 5, in NameError: name 'msg_safe' is not defined Michal