On 2018-10-16 10:09, Stanislaw Gruszka wrote: > On Fri, Oct 12, 2018 at 02:41:41PM +0200, Tom Psyborg wrote: >> On 12/10/2018, Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote: >> > On Fri, Oct 12, 2018 at 02:20:07PM +0200, Tom Psyborg wrote: >> >> > On upstream tree where this patch is intended >> >> > additional registers where never programmed as proper branch >> >> > were never used, because of additional check in RT5390 branch. >> >> > >> >> >> >> on my hardware additional registers were programmed in regardless of >> >> redundant check. that why i opened whole thread on forum since i >> >> couldn't understand how's that happening >> > >> > I don't understand how that possible either. >> >> i'd assume because device use external lna > > I have no idea how this could be related. But I think I found > somewhat reasonable explenation where the problem is. > I think below code : > > if (a || b || c) { > CODE1(); > } else if (c) { > CODE2(); > } > > can not be deterministic and can be compiled differently depending > on compiler version and used options. Sometimes it could result > in this > > if (a || b || c) { > CODE1(); > } > > and sometimes in this: > > if (a || b) { > CODE1(); > } else if (c) { > CODE2(); > } > > So that would explain the problems you see. And indeed patch > could cause regression on systems where second variant of > initalizing RT6352 registers was used. I don't see how that can be non-deterministic at all. The 'else if' part can only be hit if the first if did not match. - Felix