mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Michal Marek <mmarek@suse.cz>,
	cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Coccinelle : Script to detect cast after memory allocation
Date: Sat, 14 Jun 2014 09:06:01 -0700	[thread overview]
Message-ID: <1402761961.2756.12.camel@joe-AO725> (raw)
In-Reply-To: <20140614154541.GA4179@himangi-Dell>

On Sat, 2014-06-14 at 21:15 +0530, Himangi Saraogi wrote:
> This script detects cases of use of cast for the value returned by
> kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc,
> kmem_cache_alloc_node, kmalloc_node and kzalloc_node and removes
> the cast as it is not useful. This Coccinelle script replaces
> drop_kmalloc_cast.cocci as it removes the casting in more limited
> cases of kmalloc, kzalloc and kcalloc.

Perhaps make this more generic for any void *?

Something like:

@@
void *t;
type other;
@@

-       (other *)t
+       t



  reply	other threads:[~2014-06-14 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14 15:45 Himangi Saraogi
2014-06-14 16:06 ` Joe Perches [this message]
2014-06-14 16:11   ` Julia Lawall
2014-06-14 17:01     ` Joe Perches
     [not found]       ` <CAB78YHwDpK988sKk5pzXWhuMszyyS=wtk5ETP-B-JBGdwRPxhw@mail.gmail.com>
2014-06-14 19:37         ` Julia Lawall
2014-06-14 20:03         ` Joe Perches

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=1402761961.2756.12.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=himangi774@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=nicolas.palix@imag.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®