From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934386AbeAIBV4 (ORCPT + 1 other); Mon, 8 Jan 2018 20:21:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:34995 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934317AbeAIBVf (ORCPT ); Mon, 8 Jan 2018 20:21:35 -0500 From: NeilBrown To: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman Date: Tue, 09 Jan 2018 12:19:38 +1100 Subject: [PATCH 14/14] staging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros. Cc: lkml , lustre Message-ID: <151546077867.9776.6765866963367159386.stgit@noble> In-Reply-To: <151546052331.9776.7408338350463291753.stgit@noble> References: <151546052331.9776.7408338350463291753.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 --- .../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