From: Serge Semin Date: Fri, 9 Sep 2022 19:36:12 +0000 (+0300) Subject: ata: libahci: Don't read AHCI version twice in the save-config method X-Git-Tag: v6.6.17~6465^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fad64dc06579ac1cc05d5ab73bdaa62ee6435ed8;p=platform%2Fkernel%2Flinux-rpi.git ata: libahci: Don't read AHCI version twice in the save-config method There is no point in reading the AHCI version all over in the tail of the ahci_save_initial_config() method. That register is RO and doesn't change its value even after reset. So just reuse the data, which has already been read from there earlier in the head of the function. Signed-off-by: Serge Semin Reviewed-by: Hannes Reinecke Signed-off-by: Damien Le Moal --- diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 000a707..1ffaa5f 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -564,7 +564,7 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv) /* record values to use during operation */ hpriv->cap = cap; hpriv->cap2 = cap2; - hpriv->version = readl(mmio + HOST_VERSION); + hpriv->version = vers; hpriv->port_map = port_map; if (!hpriv->start_engine)