Constify uma_zcache_create() and uma_zsecond_create()'s "name" argument.

It is already internally handled as a pointer to a const string, in
particular by uma_zcreate().

Fix indentation while here.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2020-02-22 17:44:28 +00:00
parent cef81f8f01
commit 0464f16e91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358249
2 changed files with 10 additions and 10 deletions

View File

@ -213,8 +213,8 @@ uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor,
* A pointer to a structure which is intended to be opaque to users of * A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set. * the interface. The value may be null if the wait flag is not set.
*/ */
uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor, uma_zone_t uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master); uma_init zinit, uma_fini zfini, uma_zone_t master);
/* /*
* Create cache-only zones. * Create cache-only zones.
@ -225,9 +225,9 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
* zones. The 'arg' parameter is passed to import/release and is caller * zones. The 'arg' parameter is passed to import/release and is caller
* specific. * specific.
*/ */
uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor, uma_zone_t uma_zcache_create(const char *name, int size, uma_ctor ctor,
uma_init zinit, uma_fini zfini, uma_import zimport, uma_dtor dtor, uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags); uma_release zrelease, void *arg, int flags);
/* /*
* Definitions for uma_zcreate flags * Definitions for uma_zcreate flags

View File

@ -3014,8 +3014,8 @@ uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
/* See uma.h */ /* See uma.h */
uma_zone_t uma_zone_t
uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor, uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master) uma_init zinit, uma_fini zfini, uma_zone_t master)
{ {
struct uma_zctor_args args; struct uma_zctor_args args;
uma_keg_t keg; uma_keg_t keg;
@ -3042,9 +3042,9 @@ uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
/* See uma.h */ /* See uma.h */
uma_zone_t uma_zone_t
uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor, uma_zcache_create(const char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport, uma_init zinit, uma_fini zfini, uma_import zimport, uma_release zrelease,
uma_release zrelease, void *arg, int flags) void *arg, int flags)
{ {
struct uma_zctor_args args; struct uma_zctor_args args;