From owner-p4-projects@FreeBSD.ORG Mon Jul 10 23:02:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A6F5B16A4DF; Mon, 10 Jul 2006 23:02:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8378516A4DD for ; Mon, 10 Jul 2006 23:02:56 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5274D43D45 for ; Mon, 10 Jul 2006 23:02:56 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6AN2uAZ092189 for ; Mon, 10 Jul 2006 23:02:56 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6AN2tRH092184 for perforce@freebsd.org; Mon, 10 Jul 2006 23:02:55 GMT (envelope-from imp@freebsd.org) Date: Mon, 10 Jul 2006 23:02:55 GMT Message-Id: <200607102302.k6AN2tRH092184@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 101249 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2006 23:02:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=101249 Change 101249 by imp@imp_lighthouse on 2006/07/10 23:02:29 Polish. We can implement wiring here in about 8 lines of code. Affected files ... .. //depot/projects/arm/src/sys/dev/pci/pci.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/dev/pci/pci.c#10 (text+ko) ==== @@ -2005,17 +2005,15 @@ void pci_hint_device_unit(device_t bus, device_t child, int *unit) { - struct pci_devinfo *dinfo; - pcicfgregs *cfg; + struct pci_devinfo *dinfo = device_get_ivars(child); int i; char buf[10]; - dinfo = device_get_ivars(child); - cfg = &dinfo->cfg; + snprintf(buf, sizeof(buf), "%d:%d:%d", dinfo->cfg.bus, dinfo->cfg.slot, + dinfo->cfg.func); i = 0; - snprintf(buf, sizeof(buf), "%d:%d:%d", cfg->bus, cfg->slot, cfg->func); resource_find_dev(&i, device_get_name(child), unit, "location", buf); - device_printf(bus, "%s now %d\n", device_get_nameunit(child), *unit); + return; }