Hi Michal,

On 14 June 2018 at 07:05, Michal Simek <[email protected]> wrote:
> On 14.6.2018 14:58, Simon Glass wrote:
>> Hi,
>>
>> On 14 June 2018 at 03:32, Michal Simek <[email protected]> wrote:
>>> Make sure that functions are working with proper strcture.
>>>
>>> Signed-off-by: Michal Simek <[email protected]>
>>> ---
>>>
>>> Reported by: Coverity (local)
>>>
>>> ---
>>>  drivers/serial/serial_zynq.c | 27 ++++++++++++++++++++++++---
>>>  1 file changed, 24 insertions(+), 3 deletions(-)
>>
>> But priv cannot be NULL if the device has been probed. So this check
>> is confusing at best.
>>
>> If this is from coverity, perhaps you can find a way to mask it?
>
> Let me talk to local guy how to do it.
>
> Also can you please look at that driver and tell me if we using private
> structure is used properly?
> Because I think we should be using platdata instead.
> What was that rule for using platdate versus private data?

Private data is created when the device is probed and freed when the
device is removed.

Platform data is created when the device is bound, and survives
probe/remove cycles.

Strictly speaking, platform data should be used to hold the decoded
device tree properties. Private data should be used for run-time
things the device needs to keep track of.

Regards,
Simon
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to