Commit d9b16766 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

atomisp: remove unused code and unify a header

KLOCWORK is never defined so we can remove the workarounds for this in the
code.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a0ff368
...@@ -17,17 +17,6 @@ ...@@ -17,17 +17,6 @@
#include "storage_class.h" #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 * 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 * time rather than at run-time. It does not work for all compilers; see
......
#ifndef ISP2401
/* /*
* Support for Intel Camera Imaging ISP subsystem. * 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 * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
...@@ -12,21 +11,6 @@ ...@@ -12,21 +11,6 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details. * 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" #include "ia_css_rmgr.h"
...@@ -279,21 +263,7 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool, ...@@ -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, void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool,
struct ia_css_rmgr_vbuf_handle **handle) 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; struct ia_css_rmgr_vbuf_handle h;
#endif /* __KLOCWORK__ */
if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) { if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) {
IA_CSS_LOG("Invalid inputs"); IA_CSS_LOG("Invalid inputs");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment