Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Julian,

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.

Well, what I mean is this: suppose you have a function that gets a pointer to a struct as one of its parameters. This function calls another function with this parameter:

void foo(struct *bar) {
	some_other_fnct(bar);
}

Then foo() simply passes the pointer on to some_other_fnct(), and foo() does not need to know about the members inside struct bar. So I am not talking about void pointers here as the alternative.

Bye, Roland.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux