* [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
@ 2004-01-25 10:52 Carlo Perassi
2004-02-19 1:06 ` Randy.Dunlap
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Carlo Perassi @ 2004-01-25 10:52 UTC (permalink / raw)
To: kernel-janitors
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*.
--
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] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
@ 2004-02-19 1:06 ` Randy.Dunlap
2004-02-22 12:05 ` Carlo Perassi
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-02-19 1:06 UTC (permalink / raw)
To: kernel-janitors
On Sun, 25 Jan 2004 11:52:13 +0100 Carlo Perassi <carlo@linux.it> 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.c
drivers/net/tc35815.c
drivers/net/68360enet.c
(against 2.6.3).
Thanks,
--
~Randy
kernel-janitors project: http://janitor.kernelnewbies.org/
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
2004-02-19 1:06 ` Randy.Dunlap
@ 2004-02-22 12:05 ` Carlo Perassi
2004-02-22 12:55 ` Arnaldo Carvalho de Melo
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Carlo Perassi @ 2004-02-22 12:05 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
> 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?
--
Carlo Perassi - http://www.linux.it/~carlo/
[-- Attachment #2: 3c527 --]
[-- Type: text/plain, Size: 3932 bytes --]
--- drivers/net/3c527.c 2004-02-18 04:58:12.000000000 +0100
+++ tmp/3c527.c 2004-02-22 12:58:56.000000000 +0100
@@ -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)
[-- Attachment #3: Type: text/plain, Size: 163 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
2004-02-19 1:06 ` Randy.Dunlap
2004-02-22 12:05 ` Carlo Perassi
@ 2004-02-22 12:55 ` Arnaldo Carvalho de Melo
2004-02-23 0:23 ` Randy.Dunlap
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2004-02-22 12:55 UTC (permalink / raw)
To: kernel-janitors
Em Sun, Feb 22, 2004 at 01:05:20PM +0100, Carlo Perassi escreveu:
> > 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?
> --
> Carlo Perassi - http://www.linux.it/~carlo/
>
> static void mc32_tx_ring(struct net_device *dev)
> {
> - 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
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
` (2 preceding siblings ...)
2004-02-22 12:55 ` Arnaldo Carvalho de Melo
@ 2004-02-23 0:23 ` Randy.Dunlap
2004-02-23 0:35 ` Randy.Dunlap
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-02-23 0:23 UTC (permalink / raw)
To: kernel-janitors
On Sun, 22 Feb 2004 13:05:20 +0100 Carlo Perassi <carlo@linux.it> 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
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
` (3 preceding siblings ...)
2004-02-23 0:23 ` Randy.Dunlap
@ 2004-02-23 0:35 ` Randy.Dunlap
2004-02-24 21:53 ` Randy.Dunlap
2004-02-26 10:29 ` Carlo Perassi
6 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-02-23 0:35 UTC (permalink / raw)
To: kernel-janitors
On Sun, 22 Feb 2004 13:05:20 +0100 Carlo Perassi <carlo@linux.it> 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
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
` (4 preceding siblings ...)
2004-02-23 0:35 ` Randy.Dunlap
@ 2004-02-24 21:53 ` Randy.Dunlap
2004-02-26 10:29 ` Carlo Perassi
6 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-02-24 21:53 UTC (permalink / raw)
To: 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
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] 90 patches for unnecessary casts
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
` (5 preceding siblings ...)
2004-02-24 21:53 ` Randy.Dunlap
@ 2004-02-26 10:29 ` Carlo Perassi
6 siblings, 0 replies; 8+ messages in thread
From: Carlo Perassi @ 2004-02-26 10:29 UTC (permalink / raw)
To: kernel-janitors
On Tue, Feb 24, 2004 at 01:53:49PM -0800, Randy.Dunlap sent
those random bytes:
> 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.
--
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] 8+ messages in thread
end of thread, other threads:[~2004-02-26 10:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 10:52 [Kernel-janitors] [PATCH] 90 patches for unnecessary casts Carlo Perassi
2004-02-19 1:06 ` Randy.Dunlap
2004-02-22 12:05 ` Carlo Perassi
2004-02-22 12:55 ` Arnaldo Carvalho de Melo
2004-02-23 0:23 ` Randy.Dunlap
2004-02-23 0:35 ` Randy.Dunlap
2004-02-24 21:53 ` Randy.Dunlap
2004-02-26 10:29 ` 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.