[U-Boot] [PATCH 4/5] serial: zynq: Check priv pointer get via dev_get_priv()

Michal Simek michal.simek at xilinx.com
Thu Jun 14 13:05:02 UTC 2018


On 14.6.2018 14:58, Simon Glass wrote:
> Hi,
> 
> On 14 June 2018 at 03:32, Michal Simek <michal.simek at xilinx.com> wrote:
>> Make sure that functions are working with proper strcture.
>>
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>> ---
>>
>> 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?

Thanks,
Michal





More information about the U-Boot mailing list