Message ID | 20231026121924.2164-1-ilpo.jarvinen@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp630123vqb; Thu, 26 Oct 2023 05:19:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBvjhvkb9eEtZxe1tCvzcjiGqjv/wC+ah+YRMiPTIjMQpqBLmc+bfG80/RnQZO/lBFXzKa X-Received: by 2002:a25:83d1:0:b0:da0:5ec1:64c6 with SMTP id v17-20020a2583d1000000b00da05ec164c6mr7525132ybm.55.1698322793487; Thu, 26 Oct 2023 05:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698322793; cv=none; d=google.com; s=arc-20160816; b=iWIWe6RXYZWuA5MURE4Y64EKPEZoMETUj8ZDk1pT3AGMnhv/3q91ciKl+C+YfEnzPj Nop2BpA3egI23MZSrFqR7e1v+RYNBNQUmYfzIkIkRwRv43niby1D2+sBYmjfNqDq991b hQS3g7tM6/x/nnCxgEcOGxkC9gXGmf0va9SjkQASS7gZHjwuL6QD7B4UXoNn62Tr3xYu Ybj4dxzqJ+2k/B/Sfyy+pjSpy7O08slLALNyFKX1aeXthe98sLcEWh1FKMhXH+b1nSjj TK1YWbxqoHl6GeFZs4KVJX1kI3PRJjzC0cW/owwMwRPuJfvoF8B9EPjjvWLm9yV4sJvF 1S8A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=N1KwAg225/OovFWtRdJajr7La7odkxZr5+Irc7ciNGA=; fh=hZLmt6afxROhcWMieefqgqDfx+oilLKHrk2svuRRdTk=; b=dqAJN4o1mn3eFAjvv8J9utYr4cHwfK32LpMzl7pAe2uN4V5HkAJy4xmasKl84+fYSr MF+5bZ7tUJYF+2KjUpplbkbq6CKKtOuRl1hqZLQmMn0iix4B828ragd8KuvqhBHd5+SG Zbuj70xPZGHrM1UmAj8jPYnxAGeytkvxxv5JFZj1qQJelhxr30pIHGQ0AtCBUWXLzu3o LT2xkULEDG4BU1+LLTI0anKeaDqU8qzaqYOh+/4qZQVbdbwR8LkAYxyP+XxLWG+49gBd 65FtW0mPyyn6H+e9NHqkBTwv1/E4WRtM7Hjss0cYdguICPhziIx8D2rftlJQ+Dvaku1d aLOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fQ+ZZTTQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y125-20020a25dc83000000b00d9accf2640asi16001521ybe.168.2023.10.26.05.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 05:19:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fQ+ZZTTQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0150581822F7; Thu, 26 Oct 2023 05:19:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344887AbjJZMTk (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Thu, 26 Oct 2023 08:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234896AbjJZMTi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Oct 2023 08:19:38 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 309A4B9; Thu, 26 Oct 2023 05:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698322776; x=1729858776; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=p+Gb2snRIkAb2gO0jCgy4vPKw4QvuWg0X9Z+93KecFo=; b=fQ+ZZTTQnEOa5jU+7y8nGh0eo3MZVlZiPd+W8XaaY5G4YQEQTyQGCR30 TB3nGW1J0lCafhLzlJFJ1a70hIef/37o3DP0yuCXT9mQ7XnnBhAuVZ1Vs Jxu5gTYiq+ld8zjvnEzOIBIOMpPZK5arirKnBrVI1ws27v3BPAm3Waf91 EyMAVQe83NcCznNG/K9oI6eYyWpOHQHnx2pS4qLTnQG6p7Do8eJ0A1TIr ve9qetSdLuASy9+TiHSqemCdKV7v8t2q2faAniRFz1ncWgc59eqw+OojZ qy0t6ZpL38j7mmHMkUPymIXdJZ1VCwQHPKNRVa+qw/gXxo+B/mhlHISD6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="390390969" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="390390969" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 05:19:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="1090589448" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="1090589448" Received: from ialvarez-mobl.ger.corp.intel.com (HELO localhost) ([10.252.33.120]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 05:19:33 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() Date: Thu, 26 Oct 2023 15:19:23 +0300 Message-Id: <20231026121924.2164-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 26 Oct 2023 05:19:47 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780820521487425917 X-GMAIL-MSGID: 1780820521487425917 |
Series |
[1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
|
|
Commit Message
Ilpo Järvinen
Oct. 26, 2023, 12:19 p.m. UTC
When set parameter is 0, pcie_capability_clear_and_set_word() can be
turned into pcie_capability_clear_word() which makes the intent of the
code slightly more obvious.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/pcie/aspm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Thu, Oct 26, 2023 at 03:19:23PM +0300, Ilpo Järvinen wrote: > When set parameter is 0, pcie_capability_clear_and_set_word() can be > turned into pcie_capability_clear_word() which makes the intent of the > code slightly more obvious. > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Squashed and applied to pci/misc for v6.7, thanks! > --- > drivers/pci/pcie/aspm.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c > index 1bf630059264..3b0508b47472 100644 > --- a/drivers/pci/pcie/aspm.c > +++ b/drivers/pci/pcie/aspm.c > @@ -689,10 +689,10 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state) > * in pcie_config_aspm_link(). > */ > if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) { > - pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPM_L1, 0); > - pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPM_L1, 0); > + pcie_capability_clear_word(child, PCI_EXP_LNKCTL, > + PCI_EXP_LNKCTL_ASPM_L1); > + pcie_capability_clear_word(parent, PCI_EXP_LNKCTL, > + PCI_EXP_LNKCTL_ASPM_L1); > } > > val = 0; > -- > 2.30.2 >
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 1bf630059264..3b0508b47472 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -689,10 +689,10 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state) * in pcie_config_aspm_link(). */ if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) { - pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL, - PCI_EXP_LNKCTL_ASPM_L1, 0); - pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL, - PCI_EXP_LNKCTL_ASPM_L1, 0); + pcie_capability_clear_word(child, PCI_EXP_LNKCTL, + PCI_EXP_LNKCTL_ASPM_L1); + pcie_capability_clear_word(parent, PCI_EXP_LNKCTL, + PCI_EXP_LNKCTL_ASPM_L1); } val = 0;