[U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy

Gerlando Falauto gerlando.falauto at keymile.com
Mon Dec 12 14:52:41 CET 2011


On 12/12/2011 02:08 PM, Wolfgang Denk wrote:
> Dear Gerlando Falauto,
>
> In message<4EE5CA4A.8050601 at keymile.com>  you wrote:
>>
>>> You could just use 'apply_cb apply' for that param I think.
>>
>> Absolutely. I introduced the typedef at a later stage and forgot to
>> update it there too. Good catch, thanks!
>
> Run checkpatch, and mind the CodingStyle section about typedefs!

I did run checkpatch, it didn't say a word about this.

What is your recommendation about typedef'ining a function pointer?
I immediately suspected that using a callback function might sound like 
heresy, so if you have any better suggestion please put it forward 
before I rework this changeset for the fifth time... please.

I just think having the whole, expanded signature as the type for a 
function-pointer parameter or local variable would just make things too 
long and redundant.
Just off the top of my head: perhaps a struct with a single function 
pointer element might look better than a typedef?

Thanks,
Gerlando Falauto


More information about the U-Boot mailing list