From owner-p4-projects@FreeBSD.ORG Thu Jul 5 21:56:22 2007 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 EC2DE16A46C; Thu, 5 Jul 2007 21:56:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A442816A421; Thu, 5 Jul 2007 21:56:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4DDBE13C465; Thu, 5 Jul 2007 21:56:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l65LuJRc027636; Thu, 5 Jul 2007 17:56:19 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Rui Paulo Date: Thu, 5 Jul 2007 17:51:35 -0400 User-Agent: KMail/1.9.6 References: <200707040343.l643hQ2i073492@repoman.freebsd.org> In-Reply-To: <200707040343.l643hQ2i073492@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707051751.35532.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 05 Jul 2007 17:56:19 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3606/Thu Jul 5 13:50:01 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 122829 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: Thu, 05 Jul 2007 21:56:22 -0000 On Tuesday 03 July 2007 11:43:26 pm Rui Paulo wrote: > -static struct asmc_model *asmc_match(device_t); > +static struct asmc_model * > + asmc_match(device_t dev); Old way was better. > #define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \ > asmc_mb_sysctl_sms_z > @@ -253,21 +257,20 @@ > */ > sysctl_ctx_init(&sc->sc_sysctl_ctx); > sc->sc_root_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx, > - SYSCTL_STATIC_CHILDREN(_hw), > - OID_AUTO, > - device_get_name(dev), > - CTLFLAG_RD, 0, > - device_get_desc(dev)); > + SYSCTL_STATIC_CHILDREN(_hw), > + OID_AUTO, > + device_get_name(dev), > + CTLFLAG_RD, 0, > + device_get_desc(dev)); It's actually 4 spaces from the start of the previous line, not the start of the function name or macro on the previous line, thus: sc->sc_root_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_name(dev), CTL_FLAG_RD, 0, device_get_desc(dev)); However, why are you creating your own sysctl tree? new-bus already provides one in dev.foo.X. You can use 'device_get_sysctl_ctx()' and 'device_get_sysctl_tree()' with SYSCTL_ADD_*() to hang custom nodes off the existing tree which is preferable to doing your own thing under hw. -- John Baldwin