From nobody Mon May 25 09:56:45 2026 Received: from mail-dy1-f196.google.com (mail-dy1-f196.google.com [74.125.82.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCDA5263C9F for ; Sun, 17 May 2026 23:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779062398; cv=none; b=pMkIMdgE+s4JTOMZloebz12wKydVUN9JPxQ3EZZUGsTG0hOKRMXdQ2y5aRSWxqw0xBPreyIrc3DLkSrgepLGXNjbMe7zJyXgU05TKVLEfsorCBZlZYnfbt/40e1ZH1A8DxJPneXgKQTAtDc0G0VDaFt4FGTno68zNqZ4SGfa3mA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779062398; c=relaxed/simple; bh=lkMZQ6midkim8d093PSIK7sH1R3GzvMmBTVKdHb9S4c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CkXlJuNTGbOsX4tFBJMtvYwr/kVTeRb92QUDtz4mF9g+rgmeeVqPtADIAyw5erzqqTWe/x5dddVqlojqLnrCJUsatjqru5NsGlW5Dz90qOfGu+A8NsUp6EFaXLWrR4zm59Iq9IMvxFgJ4vex4/TFxEuVHjHNO39z5ww8x8wt4a4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HkhajKLB; arc=none smtp.client-ip=74.125.82.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HkhajKLB" Received: by mail-dy1-f196.google.com with SMTP id 5a478bee46e88-2f0ad52830cso1873332eec.1 for ; Sun, 17 May 2026 16:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779062396; x=1779667196; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Tm3rv+P1fuj1nvvkkvit+LQXf1Erfz+kwHU/iWOaQh0=; b=HkhajKLBp0CFQOyL0BqskHBeFqTjzYjmwYansTECcvtO7VmZd8efi73GU+cwnEUC/9 4KtvIIcSlN8qCI5XdLPTywEPcFihGK0L5YF/OArgb7XDsn5a/t2avtNvhvAgoi7xU9Uk 3GndtmUmMBBZ9NZ1KmvrfEEYt6H1osLPyYHeorUOIF8Y6Fd2sZnuvtgXo+aYSBUEyy1M NRlkC5CVk8FlTPp1T3EIQi2uvrj+0WWEBRXNTv+Wu6CjuqaR/+CabGP3M+WBmgePe2CI GaFLK0hMvakiba5Y9QAsEO8Hj5BMEniED920DTQhaGOTTz+ZhRUd7NtxyZ6GmWXt7zgq mibA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779062396; x=1779667196; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Tm3rv+P1fuj1nvvkkvit+LQXf1Erfz+kwHU/iWOaQh0=; b=WQtgThA6Na9zekZye22iZdX3CoJVIUO2aaHeGL4JsHoKHwwTLeXS28ZyOuAS4ofY0x X+uyuK1UTOJpOtXjezYW3RhSDhQaQBG0ehgtc+v1db0VHXgMqUOzPFhjkj7Y5RJzgXWM vuN6ktq8KdkUF0PFYQBtPCiiFotbv6Qtw++VkwVYWHckItjJiY2ZfZSKCw9Guzhzzwvv LO54fDdMimpUretOrTvK6ilEuPmAZsKztB23Avr9/uS1w1syD7SbTiikgoHHj8+QFK1L gVySEBlDG8K6Ow0tUMrK8v6fgbbKIV3XoAHcwRgL5B0KTLOKwftPftv+FmllEzDFLD/v MbwA== X-Forwarded-Encrypted: i=1; AFNElJ/N1n0yH2r/TSUP1l53hzojb8MbG1nd5jVYnteUTO4iBUbQy2jLlS+atjIE0as4p5WfjwkiyIH+9fjIWCo=@vger.kernel.org X-Gm-Message-State: AOJu0YxK7l1HECAvWvdVuI/zwW7AY9qZidvPkvsoUmDWnOOx0m2Cb+vN vZ+BTJxzc/3L+GkB4acuI9nDKG00d9RcqpYpF+aweFtft+NZZ3P+lSxqzhwRpQXh1g8= X-Gm-Gg: Acq92OEnNDG9DFRYIb5fDhQOykvBIpGP1+y210M/ete9UtvlnJvquWEE5dzZP2w8Lqm KS7uizaxbGNL4kH8v20uemOukcbKaVgi48v+VtWKIaIltK9MPYb+FEfvWvqpcQy/A6jhSTqJFGX f01/b3EO3TOLH0GmKDoLEvYIOWstO58vy3u9BGVOIH5IYD31fu0DWn+kwT+Z3gEWJbBGETGFfxo H6++DwHn1/mfJFlrsPMZV17G9yIZjAT4jFXWPMnVq/cRkSEvQ0MhF+6W0VZnyQ8yrg1gJy79cnK j0hf0AJsoSUAqWDAwlLTny1gvMXxkMQxo29wETRTv/Mbb7F9kZa5Noa4byKETnyZROfCVvVL/I4 +SWH5GMCcqXrxOSQuSiP4QhqE5oiekQgVUnqxf6uAaI9cZCcqQru0NRtA0z/PmX2+ZXnP5njWIY d9TPbhGQvL3pHX4+DWldsQlHOjvFD5xSHjUCM6fqeu6MZsj3pq5/pEmJ1XylBB0L94wi5tf+Q7Q U6HMwG4mSWEQtIunEsVICLIu3DQJ/7ghVctnzc13zP5bqHrtB/ACOe4KZxbGVTb3M8RpD8Fw+I5 ZBj2eHSFvekAlBywrQ== X-Received: by 2002:a05:7300:cc15:b0:2f8:1f2b:bb5d with SMTP id 5a478bee46e88-3039867e93emr5064378eec.25.1779062395847; Sun, 17 May 2026 16:59:55 -0700 (PDT) Received: from ethan-latitude5420.. (host-127-24.cafrjco.fresno.ca.us.clients.pavlovmedia.net. [68.180.127.24]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-134cbcb9ef5sm17803400c88.2.2026.05.17.16.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 16:59:55 -0700 (PDT) From: Ethan Nelson-Moore To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Ethan Nelson-Moore , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Subject: [PATCH] ARM: PCI: expand single-line pci_common_init() wrapper function Date: Sun, 17 May 2026 16:59:11 -0700 Message-ID: <20260517235916.57178-1-enelsonmoore@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pci_common_init() is a compatibility wrapper that simply calls pci_common_init_dev() with an additional NULL argument. The comment above it implies that it should be replaced by pci_common_init_dev(), but that has never happened - there are no callers of pci_common_init_dev() in the kernel. Make the PCI code more straightforward by updating all uses of pci_common_init() to instead call pci_common_init_dev() with a NULL first argument and removing pci_common_init(). Signed-off-by: Ethan Nelson-Moore --- arch/arm/include/asm/mach/pci.h | 9 --------- arch/arm/mach-dove/pcie.c | 2 +- arch/arm/mach-footbridge/ebsa285-pci.c | 2 +- arch/arm/mach-footbridge/netwinder-pci.c | 2 +- arch/arm/mach-mv78xx0/pcie.c | 2 +- arch/arm/mach-orion5x/board-mss2.c | 2 +- arch/arm/mach-orion5x/board-rd88f5182.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 +- arch/arm/mach-orion5x/terastation_pro2-setup.c | 2 +- arch/arm/mach-orion5x/ts209-setup.c | 2 +- arch/arm/mach-orion5x/ts409-setup.c | 2 +- 12 files changed, 11 insertions(+), 20 deletions(-) diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pc= i.h index ea9bd08895b7..caad50f64a9c 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h @@ -52,15 +52,6 @@ struct pci_sys_data { */ void pci_common_init_dev(struct device *, struct hw_pci *); =20 -/* - * Compatibility wrapper for older platforms that do not care about - * passing the parent device. - */ -static inline void pci_common_init(struct hw_pci *hw) -{ - pci_common_init_dev(NULL, hw); -} - /* * Setup early fixed I/O mapping. */ diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 3044b7e03890..f990836409f4 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c @@ -222,5 +222,5 @@ void __init dove_pcie_init(int init_port0, int init_por= t1) if (init_port1) add_pcie_port(1, DOVE_PCIE1_VIRT_BASE); =20 - pci_common_init(&dove_pci); + pci_common_init_dev(NULL, &dove_pci); } diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbri= dge/ebsa285-pci.c index c3f280d08fa7..93078a031383 100644 --- a/arch/arm/mach-footbridge/ebsa285-pci.c +++ b/arch/arm/mach-footbridge/ebsa285-pci.c @@ -41,7 +41,7 @@ static struct hw_pci ebsa285_pci __initdata =3D { static int __init ebsa285_init_pci(void) { if (machine_is_ebsa285()) - pci_common_init(&ebsa285_pci); + pci_common_init_dev(NULL, &ebsa285_pci); return 0; } =20 diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footb= ridge/netwinder-pci.c index e8304392074b..5fc0023f988f 100644 --- a/arch/arm/mach-footbridge/netwinder-pci.c +++ b/arch/arm/mach-footbridge/netwinder-pci.c @@ -55,7 +55,7 @@ static struct hw_pci netwinder_pci __initdata =3D { static int __init netwinder_pci_init(void) { if (machine_is_netwinder()) - pci_common_init(&netwinder_pci); + pci_common_init_dev(NULL, &netwinder_pci); return 0; } =20 diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 533cb7856943..9cca6841644e 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -276,5 +276,5 @@ void __init mv78xx0_pcie_init(int init_port0, int init_= port1) } } =20 - pci_common_init(&mv78xx0_pci); + pci_common_init_dev(NULL, &mv78xx0_pci); } diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion5x/boa= rd-mss2.c index 9e3d69891d2f..aad8d088f839 100644 --- a/arch/arm/mach-orion5x/board-mss2.c +++ b/arch/arm/mach-orion5x/board-mss2.c @@ -48,7 +48,7 @@ static struct hw_pci mss2_pci __initdata =3D { static int __init mss2_pci_init(void) { if (machine_is_mss2()) - pci_common_init(&mss2_pci); + pci_common_init_dev(NULL, &mss2_pci); =20 return 0; } diff --git a/arch/arm/mach-orion5x/board-rd88f5182.c b/arch/arm/mach-orion5= x/board-rd88f5182.c index 1c14e49a90a6..cee3902a95ae 100644 --- a/arch/arm/mach-orion5x/board-rd88f5182.c +++ b/arch/arm/mach-orion5x/board-rd88f5182.c @@ -106,7 +106,7 @@ static struct hw_pci rd88f5182_pci __initdata =3D { static int __init rd88f5182_pci_init(void) { if (of_machine_is_compatible("marvell,rd-88f5182-nas")) - pci_common_init(&rd88f5182_pci); + pci_common_init_dev(NULL, &rd88f5182_pci); =20 return 0; } diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/d= ns323-setup.c index fcd38ff7ca45..cdc12b4ce4c5 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c @@ -99,7 +99,7 @@ static int __init dns323_pci_init(void) * gets in the way of initialising the SATA controller. */ if (machine_is_dns323() && system_rev =3D=3D DNS323_REV_A1) - pci_common_init(&dns323_pci); + pci_common_init_dev(NULL, &dns323_pci); =20 return 0; } diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orio= n5x/kurobox_pro-setup.c index 339b10891808..c1791aeefeeb 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c @@ -144,7 +144,7 @@ static int __init kurobox_pro_pci_init(void) { if (machine_is_kurobox_pro()) { orion5x_pci_disable(); - pci_common_init(&kurobox_pro_pci); + pci_common_init_dev(NULL, &kurobox_pro_pci); } =20 return 0; diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach= -orion5x/terastation_pro2-setup.c index a9f01859d101..c7af30134fab 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c @@ -126,7 +126,7 @@ static struct hw_pci tsp2_pci __initdata =3D { static int __init tsp2_pci_init(void) { if (machine_is_terastation_pro2()) - pci_common_init(&tsp2_pci); + pci_common_init_dev(NULL, &tsp2_pci); =20 return 0; } diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts= 209-setup.c index de9092e992c5..a2c05f039d72 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c @@ -174,7 +174,7 @@ static struct hw_pci qnap_ts209_pci __initdata =3D { static int __init qnap_ts209_pci_init(void) { if (machine_is_ts209()) - pci_common_init(&qnap_ts209_pci); + pci_common_init_dev(NULL, &qnap_ts209_pci); =20 return 0; } diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts= 409-setup.c index 725688aa5cba..94e0100dee36 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c @@ -145,7 +145,7 @@ static struct hw_pci qnap_ts409_pci __initdata =3D { static int __init qnap_ts409_pci_init(void) { if (machine_is_ts409()) - pci_common_init(&qnap_ts409_pci); + pci_common_init_dev(NULL, &qnap_ts409_pci); =20 return 0; } --=20 2.43.0