Hi Marek-san, > From: Marek Vasut, Sent: Sunday, October 27, 2019 3:27 AM > > Since the $idx variable value is stored across multiple calls to > rcar_pcie_inbound_ranges() function, and the $idx value is used to > index registers which are written, subsequent calls might cause > the $idx value to be high enough to trigger writes into nonexistent > registers. > > Fix this by moving the $idx value check to the beginning of the loop. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxx> > Reviewed-by: Andrew Murray <andrew.murray@xxxxxxx> > Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> > Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx> > Cc: linux-renesas-soc@xxxxxxxxxxxxxxx > To: linux-pci@xxxxxxxxxxxxxxx > --- Thank you for the patch! Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> Best regards, Yoshihiro Shimoda