linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Hans Zhang <18255117159@163.com>
Cc: bhelgaas@google.com, kwilczynski@kernel.org,
	 manivannan.sadhasivam@linaro.org, jhp@endlessos.org,
	 daniel.stodden@gmail.com, ajayagarwal@google.com,
	 linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI/ASPM: Use boolean type for aspm_disabled and aspm_force
Date: Tue, 3 Jun 2025 12:11:04 +0300 (EEST)	[thread overview]
Message-ID: <b363ab02-a2b4-9c5d-42ea-feb208d32c5d@linux.intel.com> (raw)
In-Reply-To: <20250517154939.139237-1-18255117159@163.com>

[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]

On Sat, 17 May 2025, Hans Zhang wrote:

> The aspm_disabled and aspm_force variables are used as boolean flags.
> Change their type from int to bool and update assignments to use
> true/false instead of 1/0. This improves code clarity.
> 
> Signed-off-by: Hans Zhang <18255117159@163.com>
> ---
>  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 29fcb0689a91..98b3022802b2 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -245,7 +245,7 @@ struct pcie_link_state {
>  	u32 clkpm_disable:1;		/* Clock PM disabled */
>  };
>  
> -static int aspm_disabled, aspm_force;
> +static bool aspm_disabled, aspm_force;
>  static bool aspm_support_enabled = true;
>  static DEFINE_MUTEX(aspm_lock);
>  static LIST_HEAD(link_list);
> @@ -1712,11 +1712,11 @@ static int __init pcie_aspm_disable(char *str)
>  {
>  	if (!strcmp(str, "off")) {
>  		aspm_policy = POLICY_DEFAULT;
> -		aspm_disabled = 1;
> +		aspm_disabled = true;
>  		aspm_support_enabled = false;
>  		pr_info("PCIe ASPM is disabled\n");
>  	} else if (!strcmp(str, "force")) {
> -		aspm_force = 1;
> +		aspm_force = true;
>  		pr_info("PCIe ASPM is forcibly enabled\n");
>  	}
>  	return 1;
> @@ -1734,7 +1734,7 @@ void pcie_no_aspm(void)
>  	 */
>  	if (!aspm_force) {
>  		aspm_policy = POLICY_DEFAULT;
> -		aspm_disabled = 1;
> +		aspm_disabled = true;
>  	}
>  }

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

  reply	other threads:[~2025-06-03  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-17 15:49 [PATCH] PCI/ASPM: Use boolean type for aspm_disabled and aspm_force Hans Zhang
2025-06-03  9:11 ` Ilpo Järvinen [this message]
2025-06-13  8:48 ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b363ab02-a2b4-9c5d-42ea-feb208d32c5d@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=18255117159@163.com \
    --cc=ajayagarwal@google.com \
    --cc=bhelgaas@google.com \
    --cc=daniel.stodden@gmail.com \
    --cc=jhp@endlessos.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).