• Catalin Marinas's avatar
    mm/slab: simplify create_kmalloc_cache() args and make it static · 0c474d31
    Catalin Marinas authored
    In the slab variant of kmem_cache_init(), call new_kmalloc_cache() instead
    of initialising the kmalloc_caches array directly.  With this,
    create_kmalloc_cache() is now only called from new_kmalloc_cache() in the
    same file, so make it static.  In addition, the useroffset argument is
    always 0 while usersize is the same as size.  Remove them.
    
    Link: https://lkml.kernel.org/r/20230612153201.554742-4-catalin.marinas@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Tested-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
    Cc: Alasdair Kergon <agk@redhat.com>
    Cc: Ard Biesheuvel <ardb@kernel.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Jerry Snitselaar <jsnitsel@redhat.com>
    Cc: Joerg Roedel <joro@8bytes.org>
    Cc: Jonathan Cameron <jic23@kernel.org>
    Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Cc: Lars-Peter Clausen <lars@metafoo.de>
    Cc: Logan Gunthorpe <logang@deltatee.com>
    Cc: Marc Zyngier <maz@kernel.org>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Mike Snitzer <snitzer@kernel.org>
    Cc: "Rafael J. Wysocki" <rafael@kernel.org>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Cc: Saravana Kannan <saravanak@google.com>
    Cc: Will Deacon <will@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    0c474d31
slab.c 102 KB