From: Michael Jeanson Date: Thu, 8 Nov 2018 20:32:49 +0000 (-0500) Subject: Drop vzalloc.h wrapper X-Git-Tag: v2.12.0-pre~96 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0ca42eb7127913b7f35bcacc3bccc8ebedb429c5;p=lttng-modules.git Drop vzalloc.h wrapper Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-events.c b/lttng-events.c index f1be6028..e3a84252 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -130,7 +129,7 @@ struct lttng_session *lttng_session_create(void) GFP_KERNEL); if (!metadata_cache) goto err_free_session; - metadata_cache->data = lttng_vzalloc(METADATA_CACHE_DEFAULT_SIZE); + metadata_cache->data = vzalloc(METADATA_CACHE_DEFAULT_SIZE); if (!metadata_cache->data) goto err_free_cache; metadata_cache->cache_alloc = METADATA_CACHE_DEFAULT_SIZE; @@ -1692,7 +1691,7 @@ int lttng_metadata_printf(struct lttng_session *session, tmp_cache_alloc_size = max_t(unsigned int, session->metadata_cache->cache_alloc + len, session->metadata_cache->cache_alloc << 1); - tmp_cache_realloc = lttng_vzalloc(tmp_cache_alloc_size); + tmp_cache_realloc = vzalloc(tmp_cache_alloc_size); if (!tmp_cache_realloc) goto err; if (session->metadata_cache->data) { diff --git a/wrapper/vzalloc.h b/wrapper/vzalloc.h deleted file mode 100644 index eedaf8da..00000000 --- a/wrapper/vzalloc.h +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) - * - * wrapper/vzalloc.h - * - * Copyright (C) 2015 Michael Jeanson - */ - -#ifndef _LTTNG_WRAPPER_VZALLOC_H -#define _LTTNG_WRAPPER_VZALLOC_H - -#include -#include - -#if LTTNG_KERNEL_RANGE(2,6,36, 2,6,37) -static inline -void *lttng_vzalloc(unsigned long size) -{ - void *ret; - ret = vmalloc(size); - if (!ret) - return NULL; - memset(ret, 0, size); - return ret; -} -#else -static inline -void *lttng_vzalloc(unsigned long size) -{ - return vzalloc(size); -} -#endif - - -#endif /* _LTTNG_WRAPPER_VZALLOC_H */