[PATCH 44/83] staging: brcm80211: replaced typedef si_t with struct si_pub

Julian Calaby julian.calaby at gmail.com
Sun Jun 5 09:20:32 UTC 2011


On Sun, Jun 5, 2011 at 18:36, Roland Vossen <rvossen at broadcom.com> wrote:
> Hi Julian,
>
>> On Sat, Jun 4, 2011 at 02:37, Roland Vossen<rvossen at broadcom.com>  wrote:
>>>
>>> Hello Julian,
>>>
>>> the structure definition itself is already in a header file (aiutils.h).
>>> Probably you are referring to the forward declaration used in the patch?
>>
>> Exactly, it probably shouldn't be here as the header file that
>> includes the structure should arguably already be included.
>
> I am afraid I have to disagree with you, for the reason that by including
> the header file you introduce unnecessary coupling. Let me elaborate. If a
> .c file does not need to know the contents of a struct, but it only needs to
> know that a pointer to an opaque struct, then one should not provide the C
> file with knowledge on the internals of the struct (hence not include the .h
> file).

Fair enough. I guess I just don't like void pointers.

Thanks,

-- 
Julian Calaby

Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/



More information about the devel mailing list