Subject: Re: [PATCH 02/10] Preparatory refactoring part 2.

From: Corey Hickey <[email-masked]>
Date: Mon, 01 Oct 2007 13:46:51 -0700

Patrick McHardy wrote:
> Corey Hickey wrote:
>> The sfq_destroy() --> sfq_q_destroy() change looks pointless here,
>> but it's cleaner to split now and add code to sfq_q_destroy() in a
>> later patch.
>>
>> +static void sfq_destroy(struct Qdisc *sch)
>> +{
>> +	struct sfq_sched_data *q = qdisc_priv(sch);
>> +	sfq_q_destroy(q);
>> +}
> 
> 
> It does look pointless, after applying all patches sfq_destroy still
> remains a simply wrapper around sfq_q_destroy.

It does remain a wrapper, but both functions are used. It doesn't have 
to be this way, but I wanted to avoid duplicating code and I didn't see 
a better layout.

sfq_q_destroy is used in sfq_q_init if a kcalloc fails. sfq_q_init knows 
nothing about "struct Qdisc *sch", so it can't call sfq_destroy.

sfq_destroy is still marked as the destroy function in sfq_qdisc_ops.

-Corey