From owner-svn-src-all@FreeBSD.ORG Thu Sep 5 23:02:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB62AD49; Thu, 5 Sep 2013 23:02:43 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A98FB269F; Thu, 5 Sep 2013 23:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N2hpb079159; Thu, 5 Sep 2013 23:02:43 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N2hrB079158; Thu, 5 Sep 2013 23:02:43 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052302.r85N2hrB079158@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255275 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:02:43 -0000 Author: carl Date: Thu Sep 5 23:02:43 2013 New Revision: 255275 URL: http://svnweb.freebsd.org/changeset/base/255275 Log: Simplifying bus alloc resource call since we only need the default values. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:00:59 2013 (r255274) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:02:43 2013 (r255275) @@ -340,8 +340,8 @@ static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { - bar->pci_resource = bus_alloc_resource(ntb->device, SYS_RES_MEMORY, - &bar->pci_resource_id, 0, ~0, 1, RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, + &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); @@ -356,9 +356,8 @@ map_memory_window_bar(struct ntb_softc * { int rc; - bar->pci_resource = bus_alloc_resource(ntb->device, - SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0, 1, - RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, + SYS_RES_MEMORY, &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO);