From owner-freebsd-arch@FreeBSD.ORG Fri Sep 3 15:37:37 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90318106582E; Fri, 3 Sep 2010 15:37:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 609EA8FC13; Fri, 3 Sep 2010 15:37:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 048A246B09; Fri, 3 Sep 2010 11:37:37 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 209C38A03C; Fri, 3 Sep 2010 11:37:36 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Fri, 3 Sep 2010 10:01:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <4C80A728.6090002@freebsd.org> In-Reply-To: <4C80A728.6090002@freebsd.org> MIME-Version: 1.0 Message-Id: <201009031001.58036.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 03 Sep 2010 11:37:36 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-arch@freebsd.org Subject: Re: newbus: type (max value) for device order X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 15:37:37 -0000 On Friday, September 03, 2010 3:43:36 am Andriy Gapon wrote: > > device_add_child_ordered() takes order as a parameter of int type. > struct device stores it as u_char. > > This can be confusing, can't it? > In fact, up to r203776 we used to use order value of 100000 in acpi.c (which > effectively was 160 according to my calculations). > > Not sure what I want to suggest, perhaps defining DEVICE_MAX_ORDER or something. > Or changing the type in struct device to int. Just fix device_t to store an int I think. Also, it should probably be a u_int as negative values don't really make sense. -- John Baldwin -- John Baldwin