From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbEHHhH (ORCPT ); Fri, 8 May 2015 03:37:07 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:35169 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbbEHHhD (ORCPT ); Fri, 8 May 2015 03:37:03 -0400 From: Sudip Mukherjee To: Benjamin Romer , David Kershner , Greg Kroah-Hartman Cc: sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2] staging: unisys: remove unused functions Date: Fri, 8 May 2015 13:06:19 +0530 Message-Id: <1431070579-7622-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org these functions were just defined and never used. after removing the functions the variable visorchipset_cache_buffers_in_use is becoming unused, so removed it as well. Signed-off-by: Sudip Mukherjee --- v2: combined both patches of v1 together drivers/staging/unisys/visorchipset/visorchipset.h | 4 -- .../unisys/visorchipset/visorchipset_main.c | 43 ---------------------- 2 files changed, 47 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h index 87b63f0..fb10b46 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset.h +++ b/drivers/staging/unisys/visorchipset/visorchipset.h @@ -224,9 +224,5 @@ int visorchipset_chipset_selftest(void); int visorchipset_chipset_notready(void); void visorchipset_save_message(struct controlvm_message *msg, enum crash_obj_type type); -void *visorchipset_cache_alloc(struct kmem_cache *pool, - bool ok_to_block, char *fn, int ln); -void visorchipset_cache_free(struct kmem_cache *pool, void *p, - char *fn, int ln); #endif diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 90e41cb..1f4c529 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -200,8 +200,6 @@ struct putfile_request { int completion_status; }; -static atomic_t visorchipset_cache_buffers_in_use = ATOMIC_INIT(0); - struct parahotplug_request { struct list_head list; int id; @@ -2045,47 +2043,6 @@ visorchipset_set_device_context(u32 bus_no, u32 dev_no, void *context) } EXPORT_SYMBOL_GPL(visorchipset_set_device_context); -/* Generic wrapper function for allocating memory from a kmem_cache pool. - */ -void * -visorchipset_cache_alloc(struct kmem_cache *pool, bool ok_to_block, - char *fn, int ln) -{ - gfp_t gfp; - void *p; - - if (ok_to_block) - gfp = GFP_KERNEL; - else - gfp = GFP_ATOMIC; - /* __GFP_NORETRY means "ok to fail", meaning - * kmem_cache_alloc() can return NULL, implying the caller CAN - * cope with failure. If you do NOT specify __GFP_NORETRY, - * Linux will go to extreme measures to get memory for you - * (like, invoke oom killer), which will probably cripple the - * system. - */ - gfp |= __GFP_NORETRY; - p = kmem_cache_alloc(pool, gfp); - if (!p) - return NULL; - - atomic_inc(&visorchipset_cache_buffers_in_use); - return p; -} - -/* Generic wrapper function for freeing memory from a kmem_cache pool. - */ -void -visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln) -{ - if (!p) - return; - - atomic_dec(&visorchipset_cache_buffers_in_use); - kmem_cache_free(pool, p); -} - static ssize_t chipsetready_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) -- 1.8.1.2