[PATCH v2 2/7] memory: atmel-ebi: Simplify SMC config code
ian.eperson at dedf.co.uk
ian.eperson at dedf.co.uk
Fri Sep 1 01:10:31 PDT 2017
Alex
Looking at atmel-ebi.c in a bit more detail, my statement that
atmel_ebi_xslate_smc_timings() returns true (>0), false (0) or error
(<0) seems to be have been the intention but the code won’t, as it
stands, ever return false.
This is the “no smc-tdf-ns setting in the device tree so no other
timings must be present” case. What I think will happen is:
The of_property_read_u32() for "atmel,smc-tdf-ns" will return –EINVAL
and required will stay false.
In the for loop each the of_property_read_u32() will return –EINVAL and
the loop will continue for each entry in the xlate table. Leaving ret =
-EINVAL when the loop terminates.
The if (ret) test immediately after the out: will fail producing the
error message and returning ret (–EINVAL) rather than required (false).
If you could confirm my logic I can construct a patch to rectify the
problem.
Regards
Ian Eperson
DeDf Co Ltd
More information about the linux-arm-kernel
mailing list