From nobody Mon May 25 01:13:07 2026 Received: from mail-dy1-f194.google.com (mail-dy1-f194.google.com [74.125.82.194]) (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 DD3D32DCF46 for ; Wed, 20 May 2026 04:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779250467; cv=none; b=lf9T+z3B1CzuIEBPtq4sWMi7OLRSp1Z+vFlU5OC4xsseEW7/D0rDYFzytKjqnHZ3TLIQzZWaAWs86SrLtiMomuYbwxrY17+OR3ZezPyCJaSf81VfhR5GS9wr2XnMlTjDE6OjNWyPfIq1nEaciccd4EFiAY1aSxLc2G0hoX8l6js= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779250467; c=relaxed/simple; bh=A2OIpOZgfT2hq1mqog5UlzokfJiXaSlupMp4DQ6y87o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LKp8vDOwWML9VktWL1wQolYiKOtI6j4v/2ssdncneFdPu+B08/4m4SsiU1UKqALdtMowXrdjaj8xwHoIpIJGhUyfmsFncfutdMabHP2vlEJoa55KjXHRJxv8av7N3DGeHaeP/n8BPmFYLEKvZKmFHTiGzU9VaLS/ydIZVKTj+lE= 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=OdcJFyrC; arc=none smtp.client-ip=74.125.82.194 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="OdcJFyrC" Received: by mail-dy1-f194.google.com with SMTP id 5a478bee46e88-2ef2a1cc06dso1652115eec.0 for ; Tue, 19 May 2026 21:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779250465; x=1779855265; 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=1cp9Yn3jVfRRV3qM2GkSwh53cV8UThfVVVtOf4pBdTU=; b=OdcJFyrCUJw/vyxwcpc27Tr3RiP7ERMRDPRkvPmx7sh7ccyr0NozRx0v+eG/IhqYjY 1mJ/mhtJZv0xAVEfFbNWbd+5hp5AC4v/kb2vXF5/2o3KEuWUl9WlcbzI5iFoI/sgsEGQ 4F/Ri8MMqUWBfvGgBJrSLABv+m2RQV05qZqv0dJTMPbQJK2lx/VoigB5J1+BkCA36wG9 hO2zw4vOMQRc1AE4oLs2zNRdRvIwgTPONF7xjdhPL5iZkjFo1tCx+t/F/xB4/Bh5xwTh WXvO9o458caGBOFjbtn7YiSnRCTN5FM7rf+RZ/RN8jSkXQrJhr1A7Zl+jhxue0qnABug Nxhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779250465; x=1779855265; 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=1cp9Yn3jVfRRV3qM2GkSwh53cV8UThfVVVtOf4pBdTU=; b=ZLaOcelzD5ypi4C3/Ttg4FLBG5yvDZ1eO+EZhA3UbTrhCAQPczt92fz2he8wT0gkJF 6PEsAxaxKogpAp4xO/2G5OfZEaL5eaoKKeExtc8u9j41yz2sMFkTWqA9Zxcw89ktznni U1Ec/+qCl4H5gJ2EoEFVjdbR+Xy1NhJoVGneawbp8EanFKKhmoqi6MnYWUPmrNJ76MeZ WQ4BcAlUU0SaLQVT/vwpLu4Oi6S46WdXO2M5bsdC9b0ppgl8ZqaTkJTohfeKlPgLrO5C teDVCLfyfpVbnggRzF3pOgMr2dXVrcBvS19pN8zneNrWcwMUrYWBAswU5OgX7KFJvyjE 3GAw== X-Forwarded-Encrypted: i=1; AFNElJ8gi5V9Rz9pkFakEOaY8ib2kW1vcckrI6KfZ/Lfqp8BixQi7T6cTLMH0CJjI79RSwwaGCg+tpayIMTib48=@vger.kernel.org X-Gm-Message-State: AOJu0YzhTuA+prFIc8Jx7YLgCLGv4fDpHFF/Ykbcb0i+Y2AnXCkEyP8p pPy3mFIT4rJgMp48+reJ9MKhL0dw4ptdJPV8ZKmzxC49AosMDImQO2Av X-Gm-Gg: Acq92OGj9cVuuEF5kWGyYCRvPmhFMdmo+hP+4HigMRupxHlFfoBTZIaqS8T7mykAYvO oZICmh0PcOrdn+p7arycNy9rVY7eWO3w292a8gSZhftPT6fBLuVVNIiNFMlNqgCEKFemTPRDHmA DjYcMlPKJ38PvTK27cnYIgvaekEozxnwsZhHycvVWV9KAYe9X2ie392iZFs2ZKx/ZE+SBZrn2Xq MC99WBq9rHmbmepOdGET7SG1/ib92r7h7lGjVjt268BY0kA5yHa7k0+fc9dVoH21FBc3YYeawus 3cri5GSLZL/rCF8zJJbSlROydt1Svl7Ug/0PtK3kDXnlZ9LPBLO8z8lPdCDIUl4x9xElvMoINaN /u040aDxor5hhFLjZnouVsdSeqCmR/jwL6EUb8ARq3hti1EDizy6TCoxnKhgIC+VkXlHd+i3E1T f+uq8K4tyteeoM3Wl1CE2CJRUy3SrpVW9AkqS7BtIl9CqIhbxE+c0RPJjtDm99rZ2DdAqdVQ3zH 80JUngurqChR7M13VeaJW3FZofp1GXupk7lQZWzcP40oKvLZvNNIgLpA/F6UszBg/J1QtR+XQCP VrcKTAIB5CMpRVZz3A== X-Received: by 2002:a05:7300:aacb:b0:2dd:5641:ef2 with SMTP id 5a478bee46e88-30398642912mr9856502eec.25.1779250464758; Tue, 19 May 2026 21:14:24 -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 5a478bee46e88-30293e2e686sm21333638eec.5.2026.05.19.21.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2026 21:14:24 -0700 (PDT) From: Ethan Nelson-Moore To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andrew Lunn , Ethan Nelson-Moore , Russell King , Bjorn Helgaas , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Kuninori Morimoto Subject: [PATCH v2] ARM: PCI: merge pci_common_init_dev() into pci_common_init() Date: Tue, 19 May 2026 21:13:38 -0700 Message-ID: <20260520041343.23040-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 getting rid of the wrapper function and instead removing the device argument from pci_common_init_dev() and renaming it to pci_common_init(). Signed-off-by: Ethan Nelson-Moore Reviewed-by: Andrew Lunn --- Changes in v2: Instead of removing pci_common_init() and converting all callers to use pci_common_init_dev(), simply remove pci_common_init_dev() and the unused parent parameter in pcibios_init_hw(). Suggested by Andrew Lunn. arch/arm/include/asm/mach/pci.h | 11 +---------- arch/arm/kernel/bios32.c | 8 +++----- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pc= i.h index ece5283bdaec..83777d8c8e65 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h @@ -50,16 +50,7 @@ struct pci_sys_data { /* * Call this with your hw_pci struct to initialise the PCI system. */ -void pci_common_init_dev(struct device *, struct hw_pci *); - -/* - * 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); -} +void pci_common_init(struct hw_pci *hw); =20 /* * Setup early fixed I/O mapping. diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index ac0e890510da..a5d3c31bfa55 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -424,8 +424,7 @@ static int pcibios_init_resource(int busnr, struct pci_= sys_data *sys) return 0; } =20 -static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, - struct list_head *head) +static void pcibios_init_hw(struct hw_pci *hw, struct list_head *head) { struct pci_sys_data *sys =3D NULL; int ret; @@ -466,7 +465,6 @@ static void pcibios_init_hw(struct device *parent, stru= ct hw_pci *hw, else { list_splice_init(&sys->resources, &bridge->windows); - bridge->dev.parent =3D parent; bridge->sysdata =3D sys; bridge->busnr =3D sys->busnr; bridge->ops =3D hw->ops; @@ -492,7 +490,7 @@ static void pcibios_init_hw(struct device *parent, stru= ct hw_pci *hw, } } =20 -void pci_common_init_dev(struct device *parent, struct hw_pci *hw) +void pci_common_init(struct hw_pci *hw) { struct pci_sys_data *sys; LIST_HEAD(head); @@ -500,7 +498,7 @@ void pci_common_init_dev(struct device *parent, struct = hw_pci *hw) pci_add_flags(PCI_REASSIGN_ALL_BUS); if (hw->preinit) hw->preinit(); - pcibios_init_hw(parent, hw, &head); + pcibios_init_hw(hw, &head); if (hw->postinit) hw->postinit(); =20 --=20 2.43.0