From owner-svn-src-head@freebsd.org Mon Oct 2 02:58:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12940E346F4; Mon, 2 Oct 2017 02:58:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0E0577A51; Mon, 2 Oct 2017 02:58:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v922wTBe089650; Mon, 2 Oct 2017 02:58:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v922wSTU089643; Mon, 2 Oct 2017 02:58:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201710020258.v922wSTU089643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 2 Oct 2017 02:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324186 - in head/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci X-SVN-Commit-Revision: 324186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2017 02:58:30 -0000 Author: ian Date: Mon Oct 2 02:58:28 2017 New Revision: 324186 URL: https://svnweb.freebsd.org/changeset/base/324186 Log: Define a single instance of ahci_devclass and reference it from all the attachment code for various SOCs and busses. Remove all the static and should-have-been-static and named-differently instances of it. This should eliminate the recently-grown build warnings about multiple definitions when building arm kernels. Modified: head/sys/arm/allwinner/a10_ahci.c head/sys/arm/freescale/imx/imx6_ahci.c head/sys/arm/nvidia/tegra_ahci.c head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_mv_fdt.c head/sys/dev/ahci/ahci_pci.c Modified: head/sys/arm/allwinner/a10_ahci.c ============================================================================== --- head/sys/arm/allwinner/a10_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/allwinner/a10_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -373,8 +373,6 @@ ahci_a10_detach(device_t dev) return (ahci_detach(dev)); } -static devclass_t ahci_devclass; - static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_a10_probe), DEVMETHOD(device_attach, ahci_a10_attach), Modified: head/sys/arm/freescale/imx/imx6_ahci.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/freescale/imx/imx6_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -330,8 +330,6 @@ imx6_ahci_detach(device_t dev) return (ahci_detach(dev)); } -devclass_t ahci_devclass; - static device_method_t imx6_ahci_ata_methods[] = { /* device probe, attach and detach methods */ DEVMETHOD(device_probe, imx6_ahci_probe), Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/nvidia/tegra_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -618,8 +618,7 @@ static device_method_t tegra_ahci_methods[] = { DEVMETHOD_END }; -static devclass_t tegra_ahci_devclass; static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods, sizeof(struct tegra_ahci_sc)); -DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, ahci_devclass, NULL, NULL); Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -2747,5 +2747,8 @@ ahcipoll(struct cam_sim *sim) ahci_reset_to(ch); } } + +devclass_t ahci_devclass; + MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci.h Mon Oct 2 02:58:28 2017 (r324186) @@ -649,3 +649,6 @@ bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t int ahci_ctlr_reset(device_t dev); int ahci_ctlr_setup(device_t dev); void ahci_free_mem(device_t dev); + +extern devclass_t ahci_devclass; + Modified: head/sys/dev/ahci/ahci_mv_fdt.c ============================================================================== --- head/sys/dev/ahci/ahci_mv_fdt.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci_mv_fdt.c Mon Oct 2 02:58:28 2017 (r324186) @@ -145,7 +145,6 @@ static device_method_t ahci_methods[] = { DEVMETHOD_END }; -static devclass_t ahci_devclass; static driver_t ahci_driver = { "ahci", ahci_methods, Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci_pci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -636,7 +636,6 @@ ahci_pci_resume(device_t dev) return (bus_generic_resume(dev)); } -devclass_t ahci_devclass; static device_method_t ahci_methods[] = { DEVMETHOD(device_probe, ahci_probe), DEVMETHOD(device_attach, ahci_pci_attach),