Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2008 14:37:25 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/ata ata-all.c
Message-ID:  <20080421213724.GL82555@funkthat.com>
In-Reply-To: <200804201745.m3KHjWma066842@repoman.freebsd.org>
References:  <200804201745.m3KHjWma066842@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080421213724.GL82555>