From owner-svn-src-head@freebsd.org Tue Feb 16 17:55:12 2016 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 63895AA953C; Tue, 16 Feb 2016 17:55:12 +0000 (UTC) (envelope-from jhibbits@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 16DDC1D93; Tue, 16 Feb 2016 17:55:12 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1GHtBmD088514; Tue, 16 Feb 2016 17:55:11 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1GHtA1B088512; Tue, 16 Feb 2016 17:55:10 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201602161755.u1GHtA1B088512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 16 Feb 2016 17:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295664 - in head/sys/dev: ata/chipsets pci X-SVN-Group: head 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.20 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: Tue, 16 Feb 2016 17:55:12 -0000 Author: jhibbits Date: Tue Feb 16 17:55:10 2016 New Revision: 295664 URL: https://svnweb.freebsd.org/changeset/base/295664 Log: Convert a few more long -> rman_res_t. Modified: head/sys/dev/ata/chipsets/ata-promise.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-promise.c Tue Feb 16 16:07:12 2016 (r295663) +++ head/sys/dev/ata/chipsets/ata-promise.c Tue Feb 16 17:55:10 2016 (r295664) @@ -191,7 +191,7 @@ ata_promise_probe(device_t dev) !BUS_READ_IVAR(device_get_parent(GRANDPARENT(dev)), GRANDPARENT(dev), PCI_IVAR_DEVID, &devid) && ((devid == ATA_DEC_21150) || (devid == ATA_DEC_21150_1))) { - static long start = 0, end = 0; + static rman_res_t start = 0, end = 0; if (pci_get_slot(dev) == 1) { bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &end); Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Tue Feb 16 16:07:12 2016 (r295663) +++ head/sys/dev/pci/pci_pci.c Tue Feb 16 17:55:10 2016 (r295664) @@ -388,7 +388,7 @@ pcib_alloc_window(struct pcib_softc *sc, char buf[64]; int error, rid; - if (max_address != (u_long)max_address) + if (max_address != (rman_res_t)max_address) max_address = ~0ul; w->rman.rm_start = 0; w->rman.rm_end = max_address; @@ -1247,14 +1247,14 @@ pcib_alloc_new_window(struct pcib_softc return (ENOSPC); } - wmask = (1ul << w->step) - 1; + wmask = ((rman_res_t)1 << w->step) - 1; if (RF_ALIGNMENT(flags) < w->step) { flags &= ~RF_ALIGNMENT_MASK; flags |= RF_ALIGNMENT_LOG2(w->step); } start &= ~wmask; end |= wmask; - count = roundup2(count, 1ul << w->step); + count = roundup2(count, (rman_res_t)1 << w->step); rid = w->reg; res = bus_alloc_resource(sc->dev, type, &rid, start, end, count, flags & ~RF_ACTIVE); @@ -1389,7 +1389,7 @@ pcib_grow_window(struct pcib_softc *sc, end = w->rman.rm_end; if (start + count - 1 > end || start + count < start) return (EINVAL); - wmask = (1ul << w->step) - 1; + wmask = ((rman_res_t)1 << w->step) - 1; /* * If there is no resource at all, just try to allocate enough @@ -1435,7 +1435,7 @@ pcib_grow_window(struct pcib_softc *sc, device_printf(sc->dev, "attempting to grow %s window for (%#lx-%#lx,%#lx)\n", w->name, start, end, count); - align = 1ul << RF_ALIGNMENT(flags); + align = (rman_res_t)1 << RF_ALIGNMENT(flags); if (start < w->base) { if (rman_first_free_region(&w->rman, &start_free, &end_free) != 0 || start_free != w->base)