From patchwork Tue Feb 6 21:13:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1895910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=h2eE9DmX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=linux-ide+bounces-481-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TTwx674Mtz23gb for ; Wed, 7 Feb 2024 08:14:34 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 240901C21B48 for ; Tue, 6 Feb 2024 21:14:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBFFE1B946; Tue, 6 Feb 2024 21:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h2eE9DmX" X-Original-To: linux-ide@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADFFE1B947 for ; Tue, 6 Feb 2024 21:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707254068; cv=none; b=CZMBkGyf+NYvdbEYFFETpIyHWN80I2N6KEOsupT1E50t5sx4gNBO0hlLWfzN/LZMz3IFTSdZzlVxol/eQv/TGZ7ur8MCywzqRZkIzT3gSkUpP5FoTaRTcIan+7PURlXUdxT/HFOT5+F2RRVTunZTClrEAUtJeQ1x9rzLRvP3gMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707254068; c=relaxed/simple; bh=MJbUy/b/djxswCYIGOdYtzscULgpwapoy5GI8z/Bm4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PQH0MXhHw9hIpGHYzfn0BpOS6UtgrhlzNuEX6H8eQF8mg14U6ejA21V+8S0SY/N+3q2dsDvQY30r/FsauWaudFaPI2BH99o/bGCuDVn0jlboVochJBdkJ38Ek4xXgww/LS7/qfzUI3LqpR0yBWkOitjfQ/3zBrJtwXCkYOsQhlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h2eE9DmX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C268C433C7; Tue, 6 Feb 2024 21:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707254068; bh=MJbUy/b/djxswCYIGOdYtzscULgpwapoy5GI8z/Bm4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h2eE9DmXwYWLBWsgcmmbiq3L6qevVvmVVC7k1eUN9sVpaKADHn/o+Z19blLg0KNgA u3OxujCtN1V41XMu6ODskm6XXq0UNpWaeDRjl0HvdPyYE6dTwqlHC640DjtKPxa7L9 RkQTYsETp28fiCnSQ9DAcdrn72/YY1dW20WFz0KIJCOLiwXLE5AaqYrO+urZT7qpOD CJ12M0TEONeaESRn8aR4nYlV/GUWf/w/ZOJqorIJkGjDL2jsslmFs97lym310ga9iM /yg0Aq0x1a5Jpj4SRDJpYTtLfHVJhr0r0uI8pfrtvPchdCli5Iy/rORISsv16J4lhV ITNWKTBox0RhA== From: Niklas Cassel To: Damien Le Moal , Niklas Cassel Cc: Werner Fischer , Daniel Drake , Mika Westerberg , Jian-Hong Pan , Dieter Mummenschanz , Mario Limonciello , linux-ide@vger.kernel.org Subject: [PATCH v2 3/5] ata: ahci: drop hpriv param from ahci_update_initial_lpm_policy() Date: Tue, 6 Feb 2024 22:13:44 +0100 Message-ID: <20240206211352.1664816-4-cassel@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206211352.1664816-1-cassel@kernel.org> References: <20240206211352.1664816-1-cassel@kernel.org> Precedence: bulk X-Mailing-List: linux-ide@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need for ahci_update_initial_lpm_policy() to take hpriv as a parameter, it can easily be derived from the ata_port. Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel Acked-by: Jian-Hong Pan --- drivers/ata/ahci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 4d3ec6d15ad1..346a0f9ef246 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1655,9 +1655,9 @@ static void ahci_mark_external_port(struct ata_port *ap) ap->pflags |= ATA_PFLAG_EXTERNAL; } -static void ahci_update_initial_lpm_policy(struct ata_port *ap, - struct ahci_host_priv *hpriv) +static void ahci_update_initial_lpm_policy(struct ata_port *ap) { + struct ahci_host_priv *hpriv = ap->host->private_data; int policy = CONFIG_SATA_MOBILE_LPM_POLICY; @@ -1949,7 +1949,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ahci_mark_external_port(ap); - ahci_update_initial_lpm_policy(ap, hpriv); + ahci_update_initial_lpm_policy(ap); /* disabled/not-implemented port */ if (!(hpriv->port_map & (1 << i)))