Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Nov 2023 10:21:22 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mitchell Horne <mhorne@freebsd.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 19f073c612af - main - new-bus: Add resource_validate_map_request function
Message-ID:  <e60941ac-6795-423c-ab38-721a2636015a@FreeBSD.org>
In-Reply-To: <48b90d6b-5772-4aba-8948-bcf8b50c9b5b@freebsd.org>
References:  <202311231707.3ANH758D008755@gitrepo.freebsd.org> <48b90d6b-5772-4aba-8948-bcf8b50c9b5b@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/23/23 9:41 AM, Mitchell Horne wrote:
> 
> 
> On 11/23/23 13:07, John Baldwin wrote:
>> The branch main has been updated by jhb:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=19f073c612afa0111d216e5ccab9525bfc97ec32
>>
>> commit 19f073c612afa0111d216e5ccab9525bfc97ec32
>> Author:     John Baldwin <jhb@FreeBSD.org>
>> AuthorDate: 2023-11-23 17:06:24 +0000
>> Commit:     John Baldwin <jhb@FreeBSD.org>
>> CommitDate: 2023-11-23 17:06:24 +0000
>>
>>       new-bus: Add resource_validate_map_request function
>>       
>>       This helper function for BUS_MAP_RESOURCE performs common argument
>>       validation.
>>       
>>       Reviewed by:    imp
>>       Differential Revision:  https://reviews.freebsd.org/D42723
>> ---
>>    sys/kern/subr_bus.c | 31 +++++++++++++++++++++++++++++++
>>    sys/sys/bus.h       |  6 +++++-
>>    2 files changed, 36 insertions(+), 1 deletion(-)
>>
>> diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
>> index 648394abd026..80fe182eab56 100644
>> --- a/sys/kern/subr_bus.c
>> +++ b/sys/kern/subr_bus.c
>> @@ -2715,6 +2715,37 @@ resource_init_map_request_impl(struct resource_map_request *args, size_t sz)
>>    	args->memattr = VM_MEMATTR_DEVICE;
>>    }
>>    
>> +int
>> +resource_validate_map_request(struct resource *r,
>> +    struct resource_map_request *in, struct resource_map_request *out,
>> +    rman_res_t *startp, rman_res_t *lengthp)
> 
> Can the function be given a top-level comment stating its purpose? This
> file does a really good job providing this for the majority of its
> public functions.
> 
> Sorry to ask post-commit, but I did not see the review.

Sure.  I also hope to write a manpage for bus_generic_rl_* (and bus_get_resource_list)
along with a second manpage for bus_generic_rman_* (and bus_get_rman) describing when
they should be used.  A manpage for resource_list_* might also be nice to write, but
possibly a bit more work.

-- 
John Baldwin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e60941ac-6795-423c-ab38-721a2636015a>