From: Tom Rini Date: Wed, 26 Sep 2018 08:49:35 -0400 Subject: [U-Boot] [U-Boot, 1/4] ata: ahci: Loop over the actual number of ports, not the maximum In-Reply-To: <20180912222857.32493-1-tuomas.tynkkynen@iki.fi> References: <20180912222857.32493-1-tuomas.tynkkynen@iki.fi> Message-ID: <20180926124935.GW9877@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Sep 13, 2018 at 01:28:54AM +0300, Tuomas Tynkkynen wrote: > The loop in ahci_start_ports() is looping over the maximum number of > SCSI devices in the system, which can be larger than the amount of ports > a particular AHCI controller has. The extra looping isn't directly > harmful because the link_port_map bitmap won't have the bit set for a > nonexistent port, but it is wasteful. Replace the loop limit with the > port count of the AHCI controller instead. > > Signed-off-by: Tuomas Tynkkynen > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: