From patchwork Wed Apr 12 18:21:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 9678163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C91F860384 for ; Wed, 12 Apr 2017 18:21:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C018428630 for ; Wed, 12 Apr 2017 18:21:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4FE328697; Wed, 12 Apr 2017 18:21:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 470EC2867A for ; Wed, 12 Apr 2017 18:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755206AbdDLSV2 (ORCPT ); Wed, 12 Apr 2017 14:21:28 -0400 Received: from mga05.intel.com ([192.55.52.43]:19384 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755181AbdDLSV1 (ORCPT ); Wed, 12 Apr 2017 14:21:27 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 12 Apr 2017 11:21:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,191,1488873600"; d="scan'208";a="845051545" Received: from acox1-desk1.ger.corp.intel.com ([10.252.16.134]) by FMSMGA003.fm.intel.com with ESMTP; 12 Apr 2017 11:21:25 -0700 Subject: [PATCH 07/14] atomisp: unwrap the _ex malloc/free functions From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Wed, 12 Apr 2017 19:21:22 +0100 Message-ID: <149202127255.16615.7881549692960927512.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> References: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We are not using these for debugging or debug logging so remove the defines, trim and rename the functions. Signed-off-by: Alan Cox --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 15 +++------------ .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 17 ++++------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index 7e337e0..aa19419 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -2015,34 +2015,25 @@ ia_css_enable_isys_event_queue(bool enable) return IA_CSS_SUCCESS; } -void * -sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line) +void *sh_css_malloc(size_t size) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%d\n",size); - (void)caller_func; - (void)caller_line; if (size > 0 && my_css.malloc) return my_css.malloc(size, false); return NULL; } -void * -sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_line) +void *sh_css_calloc(size_t N, size_t size) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%d, size=%d\n",N,size); - (void)caller_func; - (void)caller_line; if (size > 0 && my_css.malloc) return my_css.malloc(N*size, true); return NULL; } -void -sh_css_free_ex(void *ptr, const char *caller_func, int caller_line) +void sh_css_free(void *ptr) { IA_CSS_ENTER_PRIVATE("ptr = %p", ptr); - (void)caller_func; - (void)caller_line; if (ptr && my_css.free) my_css.free(ptr); IA_CSS_LEAVE_PRIVATE("void"); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h index a108923..e2b6f06 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h @@ -1002,23 +1002,14 @@ sh_css_params_init(void); void sh_css_params_uninit(void); -#define sh_css_malloc(size) sh_css_malloc_ex(size, __func__, __LINE__) -#define sh_css_calloc(N, size) sh_css_calloc_ex(N, size, __func__, __LINE__) -#define sh_css_free(ptr) sh_css_free_ex(ptr, __func__, __LINE__) +void *sh_css_malloc(size_t size); +void *sh_css_calloc(size_t N, size_t size); -void * -sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line); - -void * -sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_lin); - -void -sh_css_free_ex(void *ptr, const char *caller_func, int caller_line); +void sh_css_free(void *ptr); /* For Acceleration API: Flush FW (shared buffer pointer) arguments */ -void -sh_css_flush(struct ia_css_acc_fw *fw); +void sh_css_flush(struct ia_css_acc_fw *fw); void