From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Oleg Drokin <green@linuxhacker.ru>,
Oleg Drokin <oleg.drokin@intel.com>
Subject: [PATCH 13/19] staging/lustre: Remove unused OBD_ALLOC* and OBD_FREE macros
Date: Tue, 15 Sep 2015 20:30:37 -0400 [thread overview]
Message-ID: <1442363443-3485158-14-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1442363443-3485158-1-git-send-email-green@linuxhacker.ru>
From: Oleg Drokin <green@linuxhacker.ru>
This removes now unused OBD_ALLOC, OBD_ALLOC_GFP, OBD_ALLOC_PTR,
OBD_ALLOC_LARGE and supporting infrastructure.
Also OBD_FREE, OBD_FREE_PTR, OBD_FREE_LARGE and supporting infrastructure.
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../staging/lustre/lustre/include/obd_support.h | 52 ----------------------
1 file changed, 52 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h
index d8feec7..8a3323c 100644
--- a/drivers/staging/lustre/lustre/include/obd_support.h
+++ b/drivers/staging/lustre/lustre/include/obd_support.h
@@ -551,48 +551,6 @@ __u64 obd_pages_max(void);
#define OBD_ALLOC_FAIL_MASK ((1 << OBD_ALLOC_FAIL_BITS) - 1)
#define OBD_ALLOC_FAIL_MULT (OBD_ALLOC_FAIL_MASK / 100)
-#define OBD_FREE_RTN0(ptr) \
-({ \
- kfree(ptr); \
- (ptr) = NULL; \
- 0; \
-})
-
-#define __OBD_MALLOC_VERBOSE(ptr, cptab, cpt, size, flags) \
-do { \
- (ptr) = (cptab) == NULL ? \
- kmalloc(size, flags | __GFP_ZERO) : \
- kmalloc_node(size, flags | __GFP_ZERO, \
- cfs_cpt_spread_node(cptab, cpt)); \
- if (likely((ptr) != NULL && \
- (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \
- !obd_alloc_fail(ptr, #ptr, "km", size, \
- __FILE__, __LINE__) || \
- OBD_FREE_RTN0(ptr)))) { \
- OBD_ALLOC_POST(ptr, size, "kmalloced"); \
- } \
-} while (0)
-
-#define OBD_ALLOC_GFP(ptr, size, gfp_mask) \
- __OBD_MALLOC_VERBOSE(ptr, NULL, 0, size, gfp_mask)
-
-#define OBD_ALLOC(ptr, size) OBD_ALLOC_GFP(ptr, size, GFP_NOFS)
-#define OBD_ALLOC_WAIT(ptr, size) OBD_ALLOC_GFP(ptr, size, GFP_KERNEL)
-#define OBD_ALLOC_PTR(ptr) OBD_ALLOC(ptr, sizeof(*(ptr)))
-#define OBD_ALLOC_PTR_WAIT(ptr) OBD_ALLOC_WAIT(ptr, sizeof(*(ptr)))
-
-#define OBD_ALLOC_LARGE(ptr, size) \
-do { \
- ptr = libcfs_kvzalloc(size, GFP_NOFS); \
-} while (0)
-
-#define OBD_FREE_LARGE(ptr, size) \
-do { \
- (void)(size); \
- kvfree(ptr); \
-} while (0)
-
-
#ifdef CONFIG_DEBUG_SLAB
#define POISON(ptr, c, s) do {} while (0)
#define POISON_PTR(ptr) ((void)0)
@@ -610,14 +568,6 @@ do { \
#define POISON_PAGE(page, val) do { } while (0)
#endif
-#define OBD_FREE(ptr, size) \
-do { \
- OBD_FREE_PRE(ptr, size, "kfreed"); \
- kfree(ptr); \
- POISON_PTR(ptr); \
-} while (0)
-
-
#define OBD_FREE_RCU(ptr, size, handle) \
do { \
struct portals_handle *__h = (handle); \
@@ -660,8 +610,6 @@ do { \
#define OBD_SLAB_CPT_ALLOC_GFP(ptr, slab, cptab, cpt, size, flags) \
__OBD_SLAB_ALLOC_VERBOSE(ptr, slab, cptab, cpt, size, flags)
-#define OBD_FREE_PTR(ptr) OBD_FREE(ptr, sizeof(*(ptr)))
-
#define OBD_SLAB_FREE(ptr, slab, size) \
do { \
OBD_FREE_PRE(ptr, size, "slab-freed"); \
--
2.1.0
next prev parent reply other threads:[~2015-09-16 0:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 0:30 [PATCH 00/19] Lustre cleanups green
2015-09-16 0:30 ` [PATCH 01/19] staging/lustre: Remove OBD_CPT_ALLOC_LARGE green
2015-09-16 0:30 ` [PATCH 02/19] staging/lustre: Remove unused OBD_VMALLOC green
2015-09-16 0:30 ` [PATCH 03/19] staging/lustre: Remove unused OBD_CPT_ALLOC* macros green
2015-09-16 0:30 ` [PATCH 04/19] staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h green
2015-09-16 0:30 ` [PATCH 05/19] staging/lustre/llite: Get rid of OBD_ALLOC/FREE_PTR green
2015-09-16 0:30 ` [PATCH 06/19] staging/lustre/obdclass: replace OBD_ALLOC_GFP with kzalloc green
2015-09-16 0:30 ` [PATCH 07/19] staging/lustre: Remove references to OBD_ALLOC/FREE* in comments green
2015-09-16 0:30 ` [PATCH 08/19] staging/lustre/fld: Replace OBD_ALLOC_GFP with kzalloc green
2015-09-16 0:30 ` [PATCH 09/19] staging/lustre: Convert lustre_cfg_new/free to use kzalloc/kfree green
2015-09-16 0:30 ` [PATCH 10/19] staging/lustre/ptlrpc: Replace OBD_FREE_PTR with kfree green
2015-09-16 0:30 ` [PATCH 11/19] staging/lustre: Replace last users of OBD_ALLOC/FREE_LARGE green
2015-09-16 0:30 ` [PATCH 12/19] staging/lustre: Remove stray bit of userland utils code green
2015-09-16 0:30 ` green [this message]
2015-09-16 0:30 ` [PATCH 14/19] staging/lustre: Remove memory allocation fault injection framework green
2015-09-16 0:30 ` [PATCH 15/19] staging/lustre: Remove lustre used memory tracking framework green
2015-09-16 0:30 ` [PATCH 16/19] staging/lustre: remove obd_memory stats counter green
2015-09-16 0:30 ` [PATCH 17/19] staging/lustre: Remove IS_SERVER and all users green
2015-09-16 5:35 ` Sudip Mukherjee
2015-09-16 15:08 ` Oleg Drokin
2015-09-16 0:30 ` [PATCH 18/19] staging/lustre: remove IS_MDS|IS_OST|IS_MGS defines and users green
2015-09-16 0:30 ` [PATCH 19/19] staging/lustre: Remove server defines from lustre_disk.h green
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442363443-3485158-14-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).