Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp400825imn; Thu, 28 Jul 2022 04:22:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3Ozz551k/ENky631zg9ShC9uV7QQDZo9jdf0k/pvztGoyttR/8nUBU7oOFZVLS/CQ/fId X-Received: by 2002:a05:6402:524d:b0:43c:a8:70 with SMTP id t13-20020a056402524d00b0043c00a80070mr19660769edd.33.1659007362063; Thu, 28 Jul 2022 04:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659007362; cv=none; d=google.com; s=arc-20160816; b=GZ1yZg6kJt7z4P9zuqR5QrM96P5s2KAfEs4ndTuFWMdcVlPwdR2AUZS6RAWcpFQD3j 57LQ3TnX04KNP7c0Jho8cCpwVfsmmf7nZKG7hLr1b84kO903S16b9ohbEyrEd5tMWL54 0z+RAM281UX5CZ78USJMzWqQPgsGYKT1Y5HzeNizGHR6Gug3uFh/xuOCQM+XbvR5e603 uWSwB9E9UH75EgcREEFSewZp8Aa+tW5Q0Ih0CHgbRmO15wYYn3gRwUFk15H6LwXWD50G puTuwZ5HbZYeoYXoM/WPrgXAJ88/UPrhVTb2pd62X1vdBnGw6Cfc0Xt2uTKYc3yUcEGs wnFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=DbC4FemQLlfeBdKJ7tWncqFJzy1ocACCRibfynjYwek=; b=dM8fqde+Th7z9bnM98StA/tCBUko3rihqJ0mxumEtvr5AJZi9N/icP0LO7IKLY+VBz gdKZWX3mzQNb3692Ew+75aTXSzkeVls+l5AVfRMlEmCwzlrLtscI73I/MumcORp2/q2u 1ef3dt0rgEGkcpWEo+MmKk1RWyHxlaK2xnNHYE2XdCNSQKDDNocEosoqGz/tVnBV7jDA nnsz0Ar9eu6H2QaE2Nijz2fopPIu0MMRs1m9/HVsChUZQsDou/FKEo8bATgMYe3fN9C8 9JPMSAQWHAH+rScZNPVb/6f64jGNKN+SaZSqNf44Kh/84EeJzIgbEnhRQn5whPg5Prkc E91g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b=cEFIOHNE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o21-20020a056402039500b0043cd408671csi470766edv.90.2022.07.28.04.22.17; Thu, 28 Jul 2022 04:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b=cEFIOHNE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235746AbiG1LUf (ORCPT + 99 others); Thu, 28 Jul 2022 07:20:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236690AbiG1LTp (ORCPT ); Thu, 28 Jul 2022 07:19:45 -0400 Received: from mail.baikalelectronics.com (unknown [87.245.175.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B06EE67C86; Thu, 28 Jul 2022 04:19:31 -0700 (PDT) Received: from mail (mail.baikal.int [192.168.51.25]) by mail.baikalelectronics.com (Postfix) with ESMTP id 2BD5F16D2; Thu, 28 Jul 2022 14:21:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.baikalelectronics.com 2BD5F16D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baikalelectronics.ru; s=mail; t=1659007312; bh=DbC4FemQLlfeBdKJ7tWncqFJzy1ocACCRibfynjYwek=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=cEFIOHNE9vO16MkuzA/p/GNpt14YJataxWS5h4RzFfyCbrhCeXFCkeuzLJW4r7KCi R+wjlZnW3KRO8ANMAJwnnwzoPq49cM7JBOqoDBe1XiEzDE02WD97vDlxb12YOKTJo/ X/3O7BeE+DAJaXbOVxI9T8GUDM2tZ6f/9crWwUw4= Received: from localhost (192.168.53.207) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 28 Jul 2022 14:19:27 +0300 From: Serge Semin To: Damien Le Moal , Hans de Goede , Jens Axboe , Hannes Reinecke CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Rob Herring , , , Subject: [PATCH RESEND v6 14/23] ata: libahci: Don't read AHCI version twice in the save-config method Date: Thu, 28 Jul 2022 14:18:55 +0300 Message-ID: <20220728111905.12427-15-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20220728111905.12427-1-Sergey.Semin@baikalelectronics.ru> References: <20220728111905.12427-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/ata/libahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 000a7072614f..1ffaa5f5f21a 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) -- 2.35.1