diff options
author | Joe Perches <joe@perches.com> | 2013-03-15 03:23:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-17 12:50:24 -0400 |
commit | 1f9061d27d3d2028805549c4a306324a48209057 (patch) | |
tree | 7cfb1a92933f5a9bba6745b68b6a964d9e757ef9 /drivers/net/fddi | |
parent | 7f9421c264f8a6e6137027a45ae576517f66fa56 (diff) |
drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)
Reduce the number of calls required to alloc
a zeroed block of memory.
Trivially reduces overall object size.
Other changes around these removals
o Neaten call argument alignment
o Remove an unnecessary OOM message after dma_alloc_coherent failure
o Remove unnecessary gfp_t stack variable
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fddi')
-rw-r--r-- | drivers/net/fddi/defxx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c index f116e51e3865..4c8ddc944d51 100644 --- a/drivers/net/fddi/defxx.c +++ b/drivers/net/fddi/defxx.c | |||
@@ -1070,11 +1070,10 @@ static int dfx_driver_init(struct net_device *dev, const char *print_name, | |||
1070 | (PI_ALIGN_K_DESC_BLK - 1); | 1070 | (PI_ALIGN_K_DESC_BLK - 1); |
1071 | bp->kmalloced = top_v = dma_alloc_coherent(bp->bus_dev, alloc_size, | 1071 | bp->kmalloced = top_v = dma_alloc_coherent(bp->bus_dev, alloc_size, |
1072 | &bp->kmalloced_dma, | 1072 | &bp->kmalloced_dma, |
1073 | GFP_ATOMIC); | 1073 | GFP_ATOMIC | __GFP_ZERO); |
1074 | if (top_v == NULL) | 1074 | if (top_v == NULL) |
1075 | return DFX_K_FAILURE; | 1075 | return DFX_K_FAILURE; |
1076 | 1076 | ||
1077 | memset(top_v, 0, alloc_size); /* zero out memory before continuing */ | ||
1078 | top_p = bp->kmalloced_dma; /* get physical address of buffer */ | 1077 | top_p = bp->kmalloced_dma; /* get physical address of buffer */ |
1079 | 1078 | ||
1080 | /* | 1079 | /* |