All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Perassi <carlo@linux.it>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] unnecessary cast script finder
Date: Thu, 22 Jan 2004 18:17:17 +0000	[thread overview]
Message-ID: <20040122181717.GA2685@localhost> (raw)

Hi.

I wrote a little script which searchs in driver/ (driver/net/ to be
faster) for lines of this kind:
struct A *B = (struct A *)dev->priv;

As you know, a line like the previous one probably shall be rewritten
like:
struct A *B = dev->priv;

To show you what you can get, I paste here some lines of the script's
output:

drivers/net/bonding/bond_3ad.c
  2479		struct bonding *bond = (struct bonding *)dev->priv;
drivers/net/bonding/bond_alb.c
   397		struct bonding *bond = (struct bonding *)dev->priv;
drivers/net/smc9194.c
   468		struct smc_local *lp 	= (struct smc_local *)dev->priv;
   579		struct smc_local *lp = (struct smc_local *)dev->priv;
  1139		struct smc_local *lp 	= (struct smc_local *)dev->priv;
  1263		struct smc_local *lp = (struct smc_local *)dev->priv;
  1390		struct smc_local *lp = (struct smc_local *)dev->priv;
  1463		struct smc_local *lp = (struct smc_local *)dev->priv;

The script and its (purged) output are available here:
http://www.linux.it/~carlo/somehacks/pmaker/

I have not yet wrote a script which creates the right patches and, despite
I wish to write it, it is not safe to create and submit script-made
patches without checks, so I wonder if someone would like to look at some
part of the output of the script and create the proper patches. Waiting
for a patch maker script/program, that's what I ask for.

Thanks.

-- 
Carlo Perassi - http://www.linux.it/~carlo/
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2004-01-22 18:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040122181717.GA2685@localhost \
    --to=carlo@linux.it \
    --cc=kernel-janitors@vger.kernel.org \
    /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.