Re: [PATCH 13/21] Staging: bcm: Remove typedef for _U_IP_ADDRESS and convert union to struct.

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

 



On Tue, May 22, 2012 at 5:17 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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@xxxxxxxxx>
>
> 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux