All of lore.kernel.org
 help / color / mirror / Atom feed
From: me@tobin.cc (Tobin C. Harding)
To: cocci@systeme.lip6.fr
Subject: [Cocci] prinkt specifiers
Date: Thu, 12 Oct 2017 13:11:09 +1100	[thread overview]
Message-ID: <20171012021109.GA30753@eros> (raw)
In-Reply-To: <alpine.DEB.2.20.1710110726070.3833@hadrien>

On Wed, Oct 11, 2017 at 07:27:43AM +0200, Julia Lawall wrote:
> 
> 
> On Wed, 11 Oct 2017, Tobin C. Harding wrote:
> 
> > Hi,
> >
> > Is it possible to craft a coccinelle script to find and replace calls (in the kernel) that are
> > printing pointers using %x.
> >
> > Perhaps we could easily catch the calls that are casting the pointer within argument list, for example
> >
> > 	pr_info("x: %llx\n", (unsigned long long int)ptr);
> >
> > I'm happy to try and work out how to do it, just chasing a 'yes that is exactly the type of thing
> > cocci is good at' or a 'no, you are dreaming, perhaps <this tool> can do that'
> 
> It's possible.  Look at coccinelle/demos/format.cocci
> 
> This may not be the most well tested part of Coccinelle, so if it is not
> doing what you expect, please feel free to complain.
> 
> julia

Thanks Julia

      reply	other threads:[~2017-10-12  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  0:07 [Cocci] prinkt specifiers Tobin C. Harding
2017-10-11  5:27 ` Julia Lawall
2017-10-12  2:11   ` Tobin C. Harding [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012021109.GA30753@eros \
    --to=me@tobin.cc \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.