90 patches for unnecessary casts
Subsystems (2)
PATCH 1/1 90 patches for unnecessary casts
Hi.
With more scripting and manual check, I patched 90 files removing their unnecessary casts (see line 345 of TODO).
I don't attach the patch file here because it is huge (~ 177 KB). You can find it as a .tar.gz of 90 patch files here:
http://www.linux.it/~carlo/somehacks/tkp/90patches.tar.gz
You can also find the 90 text file patches here:
http://www.linux.it/~carlo/somehacks/tkp/
their names are file*.
Signature · 5 lines
Carlo Perassi - http://www.linux.it/~carlo/ _______________________________________________ Kernel-janitors mailing list [email protected] http://lists.osdl.org/mailman/listinfo/kernel-janitors
On Sun, 25 Jan 2004 11:52:13 +0100 Carlo Perassi <[email protected]> wrote:
| Hi. | With more scripting and manual check, I patched 90 files removing | their unnecessary casts (see line 345 of TODO). | | I don't attach the patch file here because it is huge (~ 177 KB). | You can find it as a .tar.gz of 90 patch files here: | http://www.linux.it/~carlo/somehacks/tkp/90patches.tar.gz | You can also find the 90 text file patches here: | http://www.linux.it/~carlo/somehacks/tkp/ | their names are file*.
Hi Carlo,
I have most of these merged, but some of the changes no longer apply. Please rediff and resend the changes for:
drivers/net/3c527.cdrivers/net/tc35815.cdrivers/net/68360enet.c
(against 2.6.3).
Thanks,
--
~Randy
kernel-janitors project: http://janitor.kernelnewbies.org/
_______________________________________________
Kernel-janitors mailing list [email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 8 lines
I have most of these merged, but some of the changes no longer apply. Please rediff and resend the changes for:
drivers/net/3c527.cdrivers/net/tc35815.cdrivers/net/68360enet.c(against 2.6.3).
- a patch for drivers/net/3c527.c is attached
- drivers/net/tc35815.c is fine
- drivers/net/68360enet.c doesn't exist. which file do you mean?
Signature · 1 line
Carlo Perassi - http://www.linux.it/~carlo/
3c527.c renamed from net/3c527.c +16 -16
@@ -573,7 +573,7 @@static int mc32_command_nowait (struct net_device *dev,u16 cmd,void *data,int len) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int ioaddr = dev->base_addr;int ret =-1 ;
@@ -619,7 +619,7 @@static int mc32_command (struct net_device *dev,u16 cmd,void *data,int len) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int ioaddr = dev->base_addr;int ret =0 ;
@@ -671,7 +671,7 @@static void mc32_start_transceiver (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int ioaddr = dev->base_addr;/* Ignore RX overflow on device closure */
@@ -706,7 +706,7 @@static void mc32_halt_transceiver (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int ioaddr = dev->base_addr;mc32_ready_poll (dev);
@@ -743,7 +743,7 @@static int mc32_load_rx_ring (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int i;u16 rx_base;volatile struct skb_header *p;
@@ -792,7 +792,7 @@static void mc32_flush_rx_ring (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int i;for (i=0 ; i <RX_RING_LEN ; i++)
@@ -824,7 +824,7 @@static void mc32_load_tx_ring (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;volatile struct skb_header *p;int i;u16 tx_base;
@@ -861,7 +861,7 @@static void mc32_flush_tx_ring (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int i;for (i=0 ; i <TX_RING_LEN ; i++)
@@ -899,7 +899,7 @@static int mc32_open (struct net_device *dev) {int ioaddr = dev->base_addr; -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;u8 one=1 ;u8 regs;u16 descnumbuffs[2 ] = {TX_RING_LEN ,RX_RING_LEN };
@@ -1022,7 +1022,7 @@static int mc32_send_packet (struct sk_buff *skb,struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;u32 head =atomic_read (&lp->tx_ring_head);volatile struct skb_header *p, *np;
@@ -1092,7 +1092,7 @@static void mc32_update_stats (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;volatile struct mc32_stats *st = lp->stats;u32 rx_errors=0 ;
@@ -1236,7 +1236,7 @@static void mc32_tx_ring (struct net_device *dev) { -struct mc32_local *lp=(struct mc32_local *)dev->priv; +struct mc32_local *lp=dev->priv;volatile struct skb_header *np;/*
@@ -1333,7 +1333,7 @@ } ioaddr = dev->base_addr; - lp = (struct mc32_local *)dev->priv; + lp = dev->priv;/* See whats cooking */
@@ -1450,7 +1450,7 @@static int mc32_close (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;int ioaddr = dev->base_addr;u8 regs;
@@ -1499,7 +1499,7 @@static struct net_device_stats *mc32_get_stats (struct net_device *dev) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;mc32_update_stats (dev);return &lp->net_stats;
@@ -1531,7 +1531,7 @@static void do_mc32_set_multicast_list (struct net_device *dev,int retry) { -struct mc32_local *lp = (struct mc32_local *)dev->priv; +struct mc32_local *lp = dev->priv;u16 filt = (1 <<2 );/* Save Bad Packets, for stats purposes */ if (dev->flags&IFF_PROMISC )
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Em Sun, Feb 22, 2004 at 01:05:20PM +0100, Carlo Perassi escreveu:
Quoted 18 lines
Quoted 8 lines
I have most of these merged, but some of the changes no longer apply. Please rediff and resend the changes for:
drivers/net/3c527.cdrivers/net/tc35815.cdrivers/net/68360enet.c(against 2.6.3).
- a patch for
drivers/net/3c527.cis attached
-drivers/net/tc35815.cis fine
-drivers/net/68360enet.cdoesn't exist. which file do you mean?Signature · 4 lines
Carlo Perassi - http://www.linux.it/~carlo/ static void mc32_tx_ring(struct net_device *dev) {
Review
Quoted 2 lines
(quoted diff) +1
-1- struct mc32_local *lp=(struct mc32_local *)dev->priv; + struct mc32_local *lpÞv->priv;
While at it please insert spaces before and after operators, like:
struct mc32_local *lp = dev->priv;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
On Sun, 22 Feb 2004 13:05:20 +0100 Carlo Perassi <[email protected]> wrote:
| > I have most of these merged, but some of the changes no longer | > apply. Please rediff and resend the changes for: | > | > drivers/net/3c527.c | > drivers/net/tc35815.c | > drivers/net/68360enet.c | > | > (against 2.6.3). | | - a patch for drivers/net/3c527.c is attached | - drivers/net/tc35815.c is fine | - drivers/net/68360enet.c doesn't exist. which file do you mean?
Hm, that's a good question. Your 90patches tarball had a patch like so:
--- drivers/net/68360enet.c 2004-01-09 07:59:10.000000000 +0100
+++ mod/drivers/net/68360enet.c 2004-01-25 01:39:25.000000000 +0100
in "files8m2RO". So where/why did you make that patch?
Thanks,
--
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
On Sun, 22 Feb 2004 13:05:20 +0100 Carlo Perassi <[email protected]> wrote:
| > I have most of these merged, but some of the changes no longer | > apply. Please rediff and resend the changes for: | > | > drivers/net/3c527.c | > drivers/net/tc35815.c | > drivers/net/68360enet.c | > | > (against 2.6.3). | | - a patch for drivers/net/3c527.c is attached | - drivers/net/tc35815.c is fine | - drivers/net/68360enet.c doesn't exist. which file do you mean?
I see, it was in 2.6.1 but has now disappeared ... or been reinvented as fec.c.... which appears to need 1 unneeded cast repaired.
--
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
On Sun, 22 Feb 2004 13:05:20 +0100 Carlo Perassi wrote:
| > I have most of these merged, but some of the changes no longer | > apply. Please rediff and resend the changes for: | > | > drivers/net/3c527.c | > drivers/net/tc35815.c | > drivers/net/68360enet.c | > | > (against 2.6.3). | | - a patch for drivers/net/3c527.c is attached | - drivers/net/tc35815.c is fine | - drivers/net/68360enet.c doesn't exist. which file do you mean?
Hi, [for everyone, not just Carlo]
In the future please make sure that the beginning ("header") for a patch begins at a linux/ top-level directory (not something like /usr/src/linux-2.6.3) and that the old and new lines are alike in their filename/directory splits. Otherwise too much hand-editing is needed.
Example received:
--- drivers/net/3c527.c 2004-02-18 04:58:12.000000000 +0100
+++ tmp/3c527.c 2004-02-22 12:58:56.000000000 +0100
Should be (e.g.):
--- old/drivers/net/3c527.c 2004-02-18 04:58:12.000000000 +0100
+++ tmp/drivers/net/3c527.c 2004-02-22 12:58:56.000000000 +0100
Thanks,
--
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
On Tue, Feb 24, 2004 at 01:53:49PM -0800, Randy.Dunlap sent those random bytes:
Quoted 7 lines
Hi, [for everyone, not just Carlo]
In the future please make sure that the beginning ("header") for a patch begins at a linux/ top-level directory (not something like
/usr/src/linux-2.6.3) and that the old and new lines are alike in their filename/directory splits. Otherwise too much hand-editing is needed.
Ok, I will.
My apologies.
Thanks.
Signature · 5 lines
Carlo Perassi - http://www.linux.it/~carlo/ _______________________________________________ Kernel-janitors mailing list [email protected] http://lists.osdl.org/mailman/listinfo/kernel-janitors