From owner-cvs-src@FreeBSD.ORG Mon Apr 21 21:54:31 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9EC71065676; Mon, 21 Apr 2008 21:54:31 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 861DE8FC26; Mon, 21 Apr 2008 21:54:31 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (4cep3vagkpxszbtu@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id m3LLbPOc072652; Mon, 21 Apr 2008 14:37:25 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id m3LLbPpH072651; Mon, 21 Apr 2008 14:37:25 -0700 (PDT) (envelope-from jmg) Date: Mon, 21 Apr 2008 14:37:25 -0700 From: John-Mark Gurney To: "Bjoern A. Zeeb" Message-ID: <20080421213724.GL82555@funkthat.com> References: <200804201745.m3KHjWma066842@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804201745.m3KHjWma066842@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hydrogen.funkthat.com [127.0.0.1]); Mon, 21 Apr 2008 14:37:25 -0700 (PDT) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/ata ata-all.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2008 21:54:31 -0000 Bjoern A. Zeeb wrote this message on Sun, Apr 20, 2008 at 17:45 +0000: > bz 2008-04-20 17:45:32 UTC > > FreeBSD src repository > > Modified files: > sys/dev/ata ata-all.c > Log: > devclass_get_maxunit() returns n+1 with n starting at 0. > So if we have channel 0..3 devclass_get_maxunit is 4. > > It's never been a problem as devclass_get_device() has > catched a possibly bad input. Any one object to changing: .Nm devclass_get_maxunit .Nd find the maximum unit number in the class to: .Nm devclass_get_maxunit .Nd find the next free unit number in the class It looks like we may also want to change the description, as it doesn't: Returns the next unit number to be allocated to device instances in the devclass. That's what devclass_find_free_unit does, though devclass_alloc_unit doesn't use it. devclass_find_free_unit is also missing a man page. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."