[PATCH 13/21] Staging: bcm: Remove typedef for _U_IP_ADDRESS and convert union to struct.
Kevin McKinney
klmckinney1 at gmail.com
Tue May 22 12:08:46 UTC 2012
On Tue, May 22, 2012 at 5:17 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> On Tue, May 22, 2012 at 12:06:26AM -0400, Kevin McKinney wrote:
>> This patch removes typedef for _U_IP_ADDRESS,
>> changes the name of the union from _U_IP_ADDRESS
>> to bcm_ip_address, and converts the union to a
>> struct. In addition, any calls to the following
>> typedef "U_IP_ADDRESS" are changed to call the
>> struct directly.
>>
>> Signed-off-by: Kevin McKinney <klmckinney1 at gmail.com>
>
> No, this doesn't work at all. You can't be changing unions to
> structs without more explanation than that. It breaks everything.
>
My reason for changing this to a struct was to remove the need for the
typedef. Obviously I was wrong, but when I remove the keyword
"typedef", I received a compile error. So I thought the way I would
fix this would be to change it to a struct. I do understand the
difference between a struct and a union, but I did not anticipate this
change would completely break the build. Is this because of how the
fields are being referenced? Sorry about this, I will redo the entire
patch set and change this back to a union, and figure out another way
to remove the "typedef".
Thanks,
Kevin
More information about the devel
mailing list