Re: [PATCH 1/2] AT91: Remove flexible array from USBH platform data

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

 



>> The flexible array in the USBH platform data is not safe to copy.  The
>> compiler will not allocate any extra memory for the non-init platform
>> data structure (in the *_devices.c files) since it isn't given any
>> defaults at compile time.  When the probe function attempts to address
>> that array, it will actually attempt to access data in an adjacent
>> structure.
>>
>> Since there are currently no (known) implementations of the at91 USBH
>> IP with more than 2 vbus pins, I am capping the value at 2.  If somebody
>> tries to assign more, then the compiler will produce a warning.
>>
>> Signed-off-by: Justin Waters <justin.waters@xxxxxxxxxxx>
>
> Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

Acked-by: Andrew Victor <linux@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux