lkml.org 
[lkml]   [2008]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 08/10] net: remove NR_CPUS arrays in net/core/dev.c
    Alexey Dobriyan wrote:
    > On Mon, Mar 24, 2008 at 07:20:02PM -0700, Mike Travis wrote:
    >> Remove the fixed size channels[NR_CPUS] array in
    >> net/core/dev.c and dynamically allocate array based on
    >> nr_cpu_ids.
    >
    >> @@ -4362,6 +4362,13 @@ netdev_dma_event(struct dma_client *clie
    >> */
    >> static int __init netdev_dma_register(void)
    >> {
    >> + net_dma.channels = kzalloc(nr_cpu_ids * sizeof(struct net_dma),
    >> + GFP_KERNEL);
    >> + if (unlikely(net_dma.channels)) {
    >
    > !net_dma.channels
    >
    >> + printk(KERN_NOTICE
    >> + "netdev_dma: no memory for net_dma.channels\n");
    >> + return -ENOMEM;
    >> + }


    Got it, Thanks!

    -Mike


    \
     
     \ /
      Last update: 2008-03-25 16:05    [W:0.023 / U:1.036 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site