Commit 64fd90ef authored by Hans Zhang's avatar Hans Zhang Committed by Bjorn Helgaas
Browse files

PCI/ASPM: Consolidate variable declaration and initialization



Merge the declaration and initialization of 'val' into a single statement
for clarity. This eliminates a redundant assignment operation and improves
code readability while maintaining the same functionality.

Signed-off-by: default avatarHans Zhang <18255117159@163.com>
Signed-off-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250522161533.394689-1-18255117159@163.com
parent c1842b98
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -884,10 +884,9 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
/* Configure the ASPM L1 substates. Caller must disable L1 first. */
static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
{
	u32 val;
	u32 val = 0;
	struct pci_dev *child = link->downstream, *parent = link->pdev;

	val = 0;
	if (state & PCIE_LINK_STATE_L1_1)
		val |= PCI_L1SS_CTL1_ASPM_L1_1;
	if (state & PCIE_LINK_STATE_L1_2)