From owner-svn-src-stable@freebsd.org Sat Mar 24 18:42:46 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0D4AF64974; Sat, 24 Mar 2018 18:42:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51E207963A; Sat, 24 Mar 2018 18:42:46 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CC58131E2; Sat, 24 Mar 2018 18:42:46 +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 w2OIgkN3092713; Sat, 24 Mar 2018 18:42:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2OIgj91092707; Sat, 24 Mar 2018 18:42:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803241842.w2OIgj91092707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Mar 2018 18:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331493 - in stable/11/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci X-SVN-Commit-Revision: 331493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 18:42:47 -0000 Author: ian Date: Sat Mar 24 18:42:45 2018 New Revision: 331493 URL: https://svnweb.freebsd.org/changeset/base/331493 Log: MFC r324186: 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: stable/11/sys/arm/allwinner/a10_ahci.c stable/11/sys/arm/freescale/imx/imx6_ahci.c stable/11/sys/arm/nvidia/tegra_ahci.c stable/11/sys/dev/ahci/ahci.c stable/11/sys/dev/ahci/ahci.h stable/11/sys/dev/ahci/ahci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/allwinner/a10_ahci.c ============================================================================== --- stable/11/sys/arm/allwinner/a10_ahci.c Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/arm/allwinner/a10_ahci.c Sat Mar 24 18:42:45 2018 (r331493) @@ -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: stable/11/sys/arm/freescale/imx/imx6_ahci.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx6_ahci.c Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/arm/freescale/imx/imx6_ahci.c Sat Mar 24 18:42:45 2018 (r331493) @@ -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: stable/11/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- stable/11/sys/arm/nvidia/tegra_ahci.c Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/arm/nvidia/tegra_ahci.c Sat Mar 24 18:42:45 2018 (r331493) @@ -619,8 +619,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: stable/11/sys/dev/ahci/ahci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci.c Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/dev/ahci/ahci.c Sat Mar 24 18:42:45 2018 (r331493) @@ -2740,5 +2740,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: stable/11/sys/dev/ahci/ahci.h ============================================================================== --- stable/11/sys/dev/ahci/ahci.h Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/dev/ahci/ahci.h Sat Mar 24 18:42:45 2018 (r331493) @@ -648,3 +648,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: stable/11/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci_pci.c Sat Mar 24 18:06:34 2018 (r331492) +++ stable/11/sys/dev/ahci/ahci_pci.c Sat Mar 24 18:42:45 2018 (r331493) @@ -642,7 +642,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),