[U-Boot] [PATCH 1/4] ata: ahci: Loop over the actual number of ports, not the maximum

Simon Glass sjg at chromium.org
Fri Sep 14 10:55:04 UTC 2018


On 13 September 2018 at 00:28, Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi> 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 <tuomas.tynkkynen at iki.fi>
> ---
>  drivers/ata/ahci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list