All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] unnecessary cast script finder
@ 2004-01-22 18:17 Carlo Perassi
  0 siblings, 0 replies; only message in thread
From: Carlo Perassi @ 2004-01-22 18:17 UTC (permalink / raw)
  To: kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-22 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-22 18:17 [Kernel-janitors] unnecessary cast script finder Carlo Perassi

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.