mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	lustre <lustre-devel@lists.lustre.org>
Subject: [PATCH 14/14] staging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros.
Date: Tue, 09 Jan 2018 12:19:38 +1100	[thread overview]
Message-ID: <151546077867.9776.6765866963367159386.stgit@noble> (raw)
In-Reply-To: <151546052331.9776.7408338350463291753.stgit@noble>

LIBCFS_ALLOC
LIBCFS_ALLOC_ATOMIC
LIBCFS_ALLOC_POST
LIBCFS_CPT_ALLOC
LIBCFS_FREE

are no longer used, and so are removed.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 .../lustre/include/linux/libcfs/libcfs_private.h   |   51 --------------------
 1 file changed, 51 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 50a600564fb2..491d5971d199 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -75,57 +75,6 @@ do {								    \
 	lbug_with_loc(&msgdata);					\
 } while (0)
 
-#define LIBCFS_ALLOC_POST(ptr, size)					    \
-do {									    \
-	if (unlikely(!(ptr))) {						    \
-		CERROR("LNET: out of memory at %s:%d (tried to alloc '"	    \
-		       #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));  \
-	} else {							    \
-		memset((ptr), 0, (size));				    \
-	}								    \
-} while (0)
-
-/**
- * default allocator
- */
-#define LIBCFS_ALLOC(ptr, size)						    \
-do {									    \
-	LASSERT(!in_interrupt());					    \
-	(ptr) = kvmalloc((size), GFP_NOFS);				    \
-	LIBCFS_ALLOC_POST((ptr), (size));				    \
-} while (0)
-
-/**
- * non-sleeping allocator
- */
-#define LIBCFS_ALLOC_ATOMIC(ptr, size)					\
-do {									\
-	(ptr) = kmalloc((size), GFP_ATOMIC);				\
-	LIBCFS_ALLOC_POST(ptr, size);					\
-} while (0)
-
-/**
- * allocate memory for specified CPU partition
- *   \a cptab != NULL, \a cpt is CPU partition id of \a cptab
- *   \a cptab == NULL, \a cpt is HW NUMA node id
- */
-#define LIBCFS_CPT_ALLOC(ptr, cptab, cpt, size)				    \
-do {									    \
-	LASSERT(!in_interrupt());					    \
-	(ptr) = kvmalloc_node((size), GFP_NOFS, cfs_cpt_spread_node(cptab, cpt)); \
-	LIBCFS_ALLOC_POST((ptr), (size));				    \
-} while (0)
-
-#define LIBCFS_FREE(ptr, size)					  \
-do {								    \
-	if (unlikely(!(ptr))) {						\
-		CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
-		       "%s:%d\n", (int)(size), __FILE__, __LINE__);	\
-		break;						  \
-	}							       \
-	kvfree(ptr);					  \
-} while (0)
-
 /*
  * Use #define rather than inline, as lnet_cpt_table() might
  * not be defined yet

  reply	other threads:[~2018-01-09  1:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09  1:19 [PATCH 00/14] staging:lustre: convert most LIBCFS*ALLOC to k*malloc - V2 NeilBrown
2018-01-09  1:19 ` NeilBrown [this message]
2018-01-09  1:19 ` [PATCH 13/14] staging: lustre: replace LIBCFS_CPT_ALLOC() NeilBrown
2018-01-09  1:19 ` [PATCH 11/14] staging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL) NeilBrown
2018-01-09  1:19 ` [PATCH 09/14] staging: lustre: lnet-route: use kmalloc for small allocation NeilBrown
2018-01-09  1:19 ` [PATCH 05/14] staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL) NeilBrown
2018-01-09  1:19 ` [PATCH 10/14] staging: lustre: use kmalloc for allocating ksock_tx NeilBrown
2018-01-09  1:19 ` [PATCH 06/14] staging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL NeilBrown
2018-01-09  1:19 ` [PATCH 08/14] staging: lustre: more conversions to GFP_KERNEL allocations NeilBrown
2018-01-09  1:19 ` [PATCH 07/14] staging: lustre: more LIBCFS_ALLOC " NeilBrown
2018-01-09  1:19 ` [PATCH 03/14] staging: lustre: lnet: selftest: don't allocate small strings NeilBrown
2018-01-09  1:19 ` [PATCH 12/14] staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls NeilBrown
2018-01-09  1:19 ` [PATCH 04/14] staging: lustre: lnet: use kmalloc/kvmalloc in router_proc NeilBrown
2018-01-09  1:19 ` [PATCH 01/14] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc NeilBrown
2018-01-09  1:19 ` [PATCH 02/14] staging: lustre: lnet: switch to cpumask_var_t NeilBrown
2018-01-09 15:00 ` [PATCH 00/14] staging:lustre: convert most LIBCFS*ALLOC to k*malloc - V2 Greg Kroah-Hartman

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=151546077867.9776.6765866963367159386.stgit@noble \
    --to=neilb@suse.com \
    --cc=andreas.dilger@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.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

all inboxes | Powered by JetHome®