Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp992122iob; Thu, 12 May 2022 08:51:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbNQh5ZeJpfLsUlLgbtgGICrvc135EI7gUGnX+X7WzdptG4sw8O5LIJeROCx+jJkbOkU8C X-Received: by 2002:a17:906:d550:b0:6f8:60a4:c2cf with SMTP id cr16-20020a170906d55000b006f860a4c2cfmr447711ejc.477.1652370705088; Thu, 12 May 2022 08:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652370705; cv=none; d=google.com; s=arc-20160816; b=hHm6ML/tuS76tBd/zujPka2SfwWLGIb8F6M1UQbAOYA1D9cLOdcwr2kQ684aw+pqYN dSSbfB7U/vuxmeR01Vb3FVclHdw7VmFJjcmtOuBBHv5CxNJvJW/mppUwitLzMrSnv6nl BeheBM1b6Nt8VYqS4NhlaOLgDg8SEEcQTn7bl7Soz4i1IiArCOA96fIOW1pf2sRbLbtE Wbs0fiMxuemfE4n+uJdygPF2wdbOzQdnvQNRUQV2BvY1o9YsTH998kMiFMSM78Q1UHBo J6eXGuKyLQDH3aMxd+khR8uhszp61HL51lrIcIo98uMNjOjm4QbIACFYcS2E3qUaE18D r7gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=CoCLuGHosTQY/S1Lxq1K4O89X72EsqKKPftzUcmtlKY=; b=T/OGNZ4dGRxHu7VMO0GoICmIg5xAYPUnyQ5Gk3tOc/4qnvjnY0mjkpimutnlIzCjNo y+lFuKAJvE2UqfArS4WGx41ZBXeanL5sPucA+ZT1jl6rxcQKEBZKnLLUaSVxy5DvI/f2 ExbgS1T3+OIxHnCv67Qc0FCilnNK6PS17HjYR5/i2ZF44KR6g5+uUtn5lmXu7yJwTcpN uPUxo0yoBXwdiqa2oKWkm/9f1RcK03RagAzLnkwzIl4qxv8AgWq55LTDusoAdh2gXQ4j tkEApQsvgxzA67Q4KdGe0hj7eNFqZCam5/qNd9kkmC3WwXPHz17ZujZlLamf3ZodJs3D lsFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TTDGpDaf; dkim=neutral (no key) header.i=@suse.de header.b=M2c67dXe; 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=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a170906c20b00b006e89ac43dcfsi6032907ejz.899.2022.05.12.08.51.18; Thu, 12 May 2022 08:51:45 -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=@suse.de header.s=susede2_rsa header.b=TTDGpDaf; dkim=neutral (no key) header.i=@suse.de header.b=M2c67dXe; 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=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350465AbiELHBL (ORCPT + 99 others); Thu, 12 May 2022 03:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350620AbiELHAx (ORCPT ); Thu, 12 May 2022 03:00:53 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF6DB31; Thu, 12 May 2022 00:00:45 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 586CE1F91A; Thu, 12 May 2022 07:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652338844; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CoCLuGHosTQY/S1Lxq1K4O89X72EsqKKPftzUcmtlKY=; b=TTDGpDaffF83csbm+pVPxEJHDjG5eu95zsmzzCAVscFmeQNsmC0xFWz6hjargNvla4Z7Q/ JjlyJTH//PzTW5aAs/IIPmNcng/hy5ILpykh9m5JWqQ9vOVbMuJyhpB1HiLhgTSnlSRdrf 7UxLFGtIqF+Kv2FeIggYqiB+l2nWYSs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652338844; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CoCLuGHosTQY/S1Lxq1K4O89X72EsqKKPftzUcmtlKY=; b=M2c67dXeFCuF+pmxIFtTRFm4YjZ7yww8b1K9T3r/zGz1/BjWQT7eSCbS3drn0uu53tSIxW JCSblQwa/H5SmRAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1ACD913A97; Thu, 12 May 2022 07:00:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id m9qMBZywfGJCWwAAMHmgww (envelope-from ); Thu, 12 May 2022 07:00:44 +0000 Message-ID: Date: Thu, 12 May 2022 09:00:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v3 15/23] ata: libahci: Don't read AHCI version twice in the save-config method Content-Language: en-US To: Serge Semin , Damien Le Moal , Hans de Goede , Jens Axboe Cc: Serge Semin , Alexey Malahov , Pavel Parkhomenko , Rob Herring , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20220511231810.4928-1-Sergey.Semin@baikalelectronics.ru> <20220511231810.4928-16-Sergey.Semin@baikalelectronics.ru> From: Hannes Reinecke In-Reply-To: <20220511231810.4928-16-Sergey.Semin@baikalelectronics.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 5/12/22 01:18, Serge Semin wrote: > 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 > --- > 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) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer