From patchwork Mon Apr 16 16:37:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10343459 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 47E8F60542 for ; Mon, 16 Apr 2018 16:37:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39BEB2881A for ; Mon, 16 Apr 2018 16:37:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D66628815; Mon, 16 Apr 2018 16:37:23 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 A63AA28815 for ; Mon, 16 Apr 2018 16:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbeDPQhT (ORCPT ); Mon, 16 Apr 2018 12:37:19 -0400 Received: from osg.samsung.com ([64.30.133.232]:64643 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbeDPQhS (ORCPT ); Mon, 16 Apr 2018 12:37:18 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 9D78926E6F; Mon, 16 Apr 2018 09:37:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rog8CiD0ANCb; Mon, 16 Apr 2018 09:37:16 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [201.86.164.1]) by osg.samsung.com (Postfix) with ESMTPSA id EB89126E53; Mon, 16 Apr 2018 09:37:15 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f877x-0004AS-99; Mon, 16 Apr 2018 12:37:13 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Alan Cox , Sakari Ailus , Greg Kroah-Hartman , Hans de Goede , devel@driverdev.osuosl.org Subject: [PATCH 1/9] media: staging: atomisp: get rid of __KERNEL macros Date: Mon, 16 Apr 2018 12:37:04 -0400 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) 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 There's no sense for a Kernel driver to have __KERNEL macros on it. Signed-off-by: Mauro Carvalho Chehab --- .../css2400/css_2401_csi2p_system/host/system_local.h | 15 --------------- .../css2400/hive_isp_css_common/host/system_local.h | 15 --------------- .../atomisp2/css2400/hive_isp_css_include/math_support.h | 5 ----- .../atomisp2/css2400/hive_isp_css_include/print_support.h | 3 --- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 4 ---- 5 files changed, 42 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h index c16670989702..5600b32e29f4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h @@ -31,23 +31,8 @@ #define HRT_ADDRESS_WIDTH 64 /* Surprise, this is a local property */ #endif -#if !defined(__KERNEL__) || (1 == 1) /* This interface is deprecated */ #include "hrt/hive_types.h" -#else /* __KERNEL__ */ -#include - -#if HRT_ADDRESS_WIDTH == 64 -typedef uint64_t hrt_address; -#elif HRT_ADDRESS_WIDTH == 32 -typedef uint32_t hrt_address; -#else -#error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}" -#endif - -typedef uint32_t hrt_vaddress; -typedef uint32_t hrt_data; -#endif /* __KERNEL__ */ /* * Cell specific address maps diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h index 111b346dfafb..8be1cd020bf4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h @@ -33,23 +33,8 @@ #define HRT_ADDRESS_WIDTH 64 /* Surprise, this is a local property */ #endif -#if !defined(__KERNEL__) || (1==1) /* This interface is deprecated */ #include "hrt/hive_types.h" -#else /* __KERNEL__ */ -#include - -#if HRT_ADDRESS_WIDTH==64 -typedef uint64_t hrt_address; -#elif HRT_ADDRESS_WIDTH==32 -typedef uint32_t hrt_address; -#else -#error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}" -#endif - -typedef uint32_t hrt_vaddress; -typedef uint32_t hrt_data; -#endif /* __KERNEL__ */ /* * Cell specific address maps diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h index 6436dae0007e..7c52ba54fcf1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h @@ -15,9 +15,7 @@ #ifndef __MATH_SUPPORT_H #define __MATH_SUPPORT_H -#if defined(__KERNEL__) #include /* Override the definition of max/min from linux kernel*/ -#endif /*__KERNEL__*/ #if defined(_MSC_VER) #include /* Override the definition of max/min from stdlib.h*/ @@ -216,8 +214,5 @@ static inline unsigned int ceil_pow2(unsigned int a) #define OP_std_modadd(base, offset, size) ((base+offset)%(size)) #endif /* !defined(__ISP) */ -#if !defined(__KERNEL__) -#define clamp(a, min_val, max_val) MIN(MAX((a), (min_val)), (max_val)) -#endif /* !defined(__KERNEL__) */ #endif /* __MATH_SUPPORT_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h index ca0fbbb57788..37e8116b74a4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h @@ -17,9 +17,6 @@ #include -#if !defined(__KERNEL__) -#include -#endif extern int (*sh_css_printf) (const char *fmt, va_list args); /* depends on host supplied print function in ia_css_init() */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c index 85263725540d..cdbe914787c8 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c @@ -1592,10 +1592,6 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe, * - compare with (uint16_t)~0 or 0xffff * - different assert for Linux and Windows */ -#ifndef __KERNEL__ - assert(or_mask <= UINT16_MAX); - assert(and_mask <= UINT16_MAX); -#endif (void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */