From patchwork Fri Mar 10 11:33:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 39949 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmIo8-0004Db-WC; Fri, 10 Mar 2017 11:34:04 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1cmIo6-0000RS-lU; Fri, 10 Mar 2017 12:34:04 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933792AbdCJLdz (ORCPT + 1 other); Fri, 10 Mar 2017 06:33:55 -0500 Received: from mga01.intel.com ([192.55.52.88]:16636 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933595AbdCJLdx (ORCPT ); Fri, 10 Mar 2017 06:33:53 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2017 03:33:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,140,1486454400"; d="scan'208";a="942819281" Received: from acox1-desk1.ger.corp.intel.com ([10.252.18.115]) by orsmga003.jf.intel.com with ESMTP; 10 Mar 2017 03:33:46 -0800 Subject: [PATCH 2/8] atomisp: remove unused code and unify a header From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Fri, 10 Mar 2017 11:33:45 +0000 Message-ID: <148914562054.25309.14661265320713382193.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <148914560647.25309.2276061224604665212.stgit@acox1-desk1.ger.corp.intel.com> References: <148914560647.25309.2276061224604665212.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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.3.10.112417 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY_BIG_COIN 0, __FRAUD_MONEY_BIG_COIN_DIG 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0' KLOCWORK is never defined so we can remove the workarounds for this in the code. Signed-off-by: Alan Cox --- .../css2400/hive_isp_css_include/assert_support.h | 11 ------- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 32 +------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/assert_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/assert_support.h index 95f3892..4d68405 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/assert_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/assert_support.h @@ -17,17 +17,6 @@ #include "storage_class.h" -#ifdef __KLOCWORK__ -/* Klocwork does not see that assert will lead to abortion - * as there is no good way to tell this to KW and the code - * should not depend on assert to function (actually the assert - * could be disabled in a release build) it was decided to - * disable the assert for KW scans (by defining NDEBUG) - * see also: http://www.klocwork.com/products/documentation/current/Tuning_C/C%2B%2B_analysis#Assertions - */ -#define NDEBUG -#endif /* __KLOCWORK__ */ - /** * The following macro can help to test the size of a struct at compile * time rather than at run-time. It does not work for all compilers; see diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c index dc30e7c..3aafc0a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c @@ -1,7 +1,6 @@ -#ifndef ISP2401 /* * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. + * Copyright (c) 2010-2015, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -12,21 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ -#else -/** -Support for Intel Camera Imaging ISP subsystem. -Copyright (c) 2010 - 2015, Intel Corporation. - -This program is free software; you can redistribute it and/or modify it -under the terms and conditions of the GNU General Public License, -version 2, as published by the Free Software Foundation. - -This program is distributed in the hope it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. -*/ -#endif #include "ia_css_rmgr.h" @@ -279,21 +263,7 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool, void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool, struct ia_css_rmgr_vbuf_handle **handle) { -#ifdef __KLOCWORK__ - /* KW sees the *handle = h; assignment about 20 lines down - and thinks that we are assigning a local to a global. - What it does not see is that in ia_css_i_host_rmgr_pop_handle - a new value is assigned to handle. - So this is a false positive KW issue. - To fix that we make the struct static for KW so it will - think that h remains alive; we do not want this in our - production code though as it breaks reentrancy of the code - */ - - static struct ia_css_rmgr_vbuf_handle h; -#else /* __KLOCWORK__ */ struct ia_css_rmgr_vbuf_handle h; -#endif /* __KLOCWORK__ */ if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) { IA_CSS_LOG("Invalid inputs");