Hi Michal,
On Mon, 18 Aug 2025 at 18:48, Michal Simek <michal.si...@amd.com> wrote: > > > > On 8/18/25 13:40, Anand Moon wrote: > > Hi Andrew, > > > > On Mon, 18 Aug 2025 at 14:54, Andrew Goodbody > > <andrew.goodb...@linaro.org> wrote: > >> > >> The timeout test in axi_dma_init is not correct due to the > >> post-decrement used on the timeout variable which will mean timeout is > >> not 0 if the timeout occurs. Make the timeout variable an int instead of > >> a u32 and then test for timeout being -1. > >> > >> This issue was found by Smatch. > >> > > You can use read_poll_timeout instead of a while loop timeout? > he could use it but then this should be split to two reads because two > conditions are checked and not sure if it is worth to do it. > I initially overlooked the separate readl calls for dmatx and dmarx, but replacing the manual while loop with read_poll_timeout would significantly improve the code by making the polling logic cleaner. > Thanks, > Michal Thanks -Anand