Re: i2o: CONFIG_DEBUG_SG compilation fixed

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vasily Averin <vvs@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, <devel@...>, Andrew Morton <akpm@...>
Date: Monday, October 29, 2007 - 4:58 am

On Mon, Oct 29 2007, Vasily Averin wrote:

This should already work, since Oct 24. Your i2o_block_request_alloc()
should look like this:

static inline struct i2o_block_request *i2o_block_request_alloc(void)
{
        struct i2o_block_request *ireq;

        ireq = mempool_alloc(i2o_blk_req_pool.pool, GFP_ATOMIC);
        if (!ireq)
                return ERR_PTR(-ENOMEM);

        INIT_LIST_HEAD(&ireq->queue);
        sg_init_table(ireq->sg_table, I2O_MAX_PHYS_SEGMENTS);

        return ireq;
}

Note that I also don't like your solution, no need to change this to be
a constructor setup and you definitely should not guard sg_init_table()
with CONFIG_DEBUG_SG. It needs to be done always.

-- 
Jens Axboe

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
i2o: CONFIG_DEBUG_SG compilation fixed, Vasily Averin, (Mon Oct 29, 2:32 am)
Re: i2o: CONFIG_DEBUG_SG compilation fixed, Jens Axboe, (Mon Oct 29, 4:58 am)