* Re: Strange patch to the Z85230 driver.
2002-10-12 18:02 Strange patch to the Z85230 driver Alan Cox
@ 2002-10-12 17:59 ` William Lee Irwin III
2002-10-12 18:19 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2002-10-12 17:59 UTC (permalink / raw)
To: Alan Cox; +Cc: Linus Torvalds, Linux Kernel Mailing List
On Sat, Oct 12, 2002 at 07:02:29PM +0100, Alan Cox wrote:
> These are DMA ring buffers for ISA DMA, they do not need to be zeroed.
get_free_page() was #defined to get_zeroed_page() to begin with.
/mnt/b/2.5.38/linux-2.5/include/linux/gfp.h:83:#define get_free_page get_zeroed_page
Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Strange patch to the Z85230 driver.
@ 2002-10-12 18:02 Alan Cox
2002-10-12 17:59 ` William Lee Irwin III
2002-10-12 18:19 ` Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2002-10-12 18:02 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Kernel Mailing List
These are DMA ring buffers for ISA DMA, they do not need to be zeroed.
diff -Nru a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
--- a/drivers/net/wan/z85230.c Fri Oct 11 21:22:51 2002
+++ b/drivers/net/wan/z85230.c Fri Oct 11 21:22:51 2002
@@ -889,12 +889,12 @@
if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE;
- c->rx_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+ c->rx_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->rx_buf[0]==NULL)
return -ENOBUFS;
c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2;
- c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+ c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL)
{
free_page((unsigned long)c->rx_buf[0]);
@@ -1079,7 +1079,7 @@
if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE;
- c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+ c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL)
return -ENOBUFS;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange patch to the Z85230 driver.
2002-10-12 18:02 Strange patch to the Z85230 driver Alan Cox
2002-10-12 17:59 ` William Lee Irwin III
@ 2002-10-12 18:19 ` Linus Torvalds
2002-10-12 19:31 ` Alan Cox
1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2002-10-12 18:19 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel Mailing List
On 12 Oct 2002, Alan Cox wrote:
>
> These are DMA ring buffers for ISA DMA, they do not need to be zeroed.
Note that the code is the same as it alwasy was - the patch is part of a
rename: "get_free_page()" is gone and is now called "get_zeroed_page()"
so that people see what it does.
"get_free_page()" has always zeroed the contents, with "__get_free_page()"
being the old traditional (and now long non-zeroing variety.
So the patch is purely cosmetic, and if the code was strange before, it's
strange now.
And it's perhaps more _clearly_ strange, which was really the whole point
of the patch.
See the part of the changeset that touches <linux/gfp.h>:
--- a/include/linux/gfp.h Sat Oct 12 11:16:59 2002
+++ b/include/linux/gfp.h Sat Oct 12 11:16:59 2002
@@ -71,11 +71,6 @@
__get_free_pages((gfp_mask) | GFP_DMA,(order))
/*
- * The old interface name will be removed in 2.5:
- */
-#define get_free_page get_zeroed_page
-
-/*
* There is only one 'core' page-freeing function.
*/
extern void FASTCALL(__free_pages(struct page *page, unsigned int order));
to see that even the comment said this should be done.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange patch to the Z85230 driver.
2002-10-12 18:19 ` Linus Torvalds
@ 2002-10-12 19:31 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2002-10-12 19:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Kernel Mailing List
On Sat, 2002-10-12 at 19:19, Linus Torvalds wrote:
> So the patch is purely cosmetic, and if the code was strange before, it's
> strange now.
>
> And it's perhaps more _clearly_ strange, which was really the whole point
> of the patch.
Well it certainly worked 8)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-10-12 19:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12 18:02 Strange patch to the Z85230 driver Alan Cox
2002-10-12 17:59 ` William Lee Irwin III
2002-10-12 18:19 ` Linus Torvalds
2002-10-12 19:31 ` Alan Cox
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®