Skip to contentSkip to conversation

media: atomisp: Remove empty isys_public.h

PATCH In review Hans de Goede 2 participants 7 messages Jul 15, 2023 – Jul 26, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 media: atomisp: Remove empty isys_public.h

isys_public.h is empty, remove it.

---
 .../hive_isp_css_include/host/isys_public.h   | 19 -------------------
 .../atomisp/pci/isp2400_input_system_public.h |  1 -
 2 files changed, 20 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h deleted +0 -19
deleted file mode 100644
index 9dacef7a5cc1..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 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.
- */
-
-#ifndef __ISYS_PUBLIC_H_INCLUDED__
-#define __ISYS_PUBLIC_H_INCLUDED__
-
-#endif /* __ISYS_PUBLIC_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/isp2400_input_system_public.h +0 -1
index 375c0db84b55..b1360eeb58df 100644
@@ -17,7 +17,6 @@
 #define __INPUT_SYSTEM_2400_PUBLIC_H_INCLUDED__
 
 #include <type_support.h>
-#include "isys_public.h"
 
 typedef struct receiver_state_s			receiver_state_t;
 
Signature · 1 line
2.41.0
#1 lore raw

PATCH 2/3 media: atomisp: Remove aliases for MIPI_FORMAT_2400_CUSTOM0

isp2400_input_system_local.h defines 2 aliases for MIPI_FORMAT_2400_CUSTOM0 MIPI_FORMAT_JPEG, which is entirely unused and MIPI_FORMAT_BINARY_8 which is used once in ia_css_isys_2400_set_fmt_type().

Drop these aliases and directly use MIPI_FORMAT_2400_CUSTOM0 in ia_css_isys_2400_set_fmt_type().

---
 drivers/staging/media/atomisp/pci/isp2400_input_system_local.h | 2 --
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c        | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/media/atomisp/pci/isp2400_input_system_local.h +0 -2
index e7b84fdbb4e0..6319d6449f20 100644
@@ -200,8 +200,6 @@ typedef enum {
 	N_MIPI_FORMAT_2400,
 } mipi_format_2400_t;
 
-#define MIPI_FORMAT_JPEG	MIPI_FORMAT_2400_CUSTOM0
-#define MIPI_FORMAT_BINARY_8	MIPI_FORMAT_2400_CUSTOM0
 #define N_MIPI_FORMAT_CUSTOM	8
 
 /* The number of stores for compressed format types */
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +1 -1
index c8316e0965d0..deb4130f710c 100644
@@ -271,7 +271,7 @@ static int ia_css_isys_2400_set_fmt_type(enum atomisp_input_format input_format,
 		*fmt_type = MIPI_FORMAT_2400_RAW16;
 		break;
 	case ATOMISP_INPUT_FORMAT_BINARY_8:
-		*fmt_type = MIPI_FORMAT_BINARY_8;
+		*fmt_type = MIPI_FORMAT_2400_CUSTOM0;
 		break;
 	case ATOMISP_INPUT_FORMAT_YUV420_16:
 	case ATOMISP_INPUT_FORMAT_YUV422_16:
Signature · 1 line
2.41.0
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] media: atomisp: Remove aliases for MIPI_FORMAT_2400_CUSTOM0

Hi Hans,

Quoted 41 lines · Hans de Goede

isp2400_input_system_local.h defines 2 aliases for MIPI_FORMAT_2400_CUSTOM0 MIPI_FORMAT_JPEG, which is entirely unused and MIPI_FORMAT_BINARY_8 which is used once in ia_css_isys_2400_set_fmt_type().

Drop these aliases and directly use MIPI_FORMAT_2400_CUSTOM0 in ia_css_isys_2400_set_fmt_type().

---
 drivers/staging/media/atomisp/pci/isp2400_input_system_local.h | 2 --
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c        | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/media/atomisp/pci/isp2400_input_system_local.h +0 -2
index e7b84fdbb4e0..6319d6449f20 100644
@@ -200,8 +200,6 @@ typedef enum {
        N_MIPI_FORMAT_2400,
 } mipi_format_2400_t;
 
-#define MIPI_FORMAT_JPEG       MIPI_FORMAT_2400_CUSTOM0
-#define MIPI_FORMAT_BINARY_8   MIPI_FORMAT_2400_CUSTOM0
 #define N_MIPI_FORMAT_CUSTOM   8
 
 /* The number of stores for compressed format types */
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +1 -2
index c8316e0965d0..deb4130f710c 100644
@@ -271,7 +271,7 @@ static int ia_css_isys_2400_set_fmt_type(enum atomisp_input_format input_format,
                *fmt_type = MIPI_FORMAT_2400_RAW16;
                break;
        case ATOMISP_INPUT_FORMAT_BINARY_8:
-               *fmt_type = MIPI_FORMAT_BINARY_8;
+               *fmt_type = MIPI_FORMAT_2400_CUSTOM0;
                break;
        case ATOMISP_INPUT_FORMAT_YUV420_16:
        case ATOMISP_INPUT_FORMAT_YUV422_16:
--
Quoted 2 lines

2.41.0

Thank you for working on this.

It looks good to me.

--
BR,
Kate

#3 lore raw

PATCH 3/3 media: atomisp: Mark ia_css_isys_240?_init() static

In reply to Hans de Goede

ia_css_isys_240?_init() are only used inside the C file where they are declared, mark them as static fixing:

drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c:24:20:
warning: no previous prototype for 'ia_css_isys_2400_init' 24 | input_system_err_t ia_css_isys_2400_init(void)

      |                    ^~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c:87:20:
   warning: no previous prototype for 'ia_css_isys_2401_init'
   87 | input_system_err_t ia_css_isys_2401_init(void)
      |                    ^~~~~~~~~~~~~~~~~~~~~
---
 .../staging/media/atomisp/pci/runtime/isys/src/isys_init.c    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c +2 -2
index 1a7b45bb4544..18bfe1010989 100644
@@ -21,7 +21,7 @@
 #include "isys_dma_public.h"	/* isys2401_dma_set_max_burst_size() */
 #include "isys_irq.h"
 
-input_system_err_t ia_css_isys_2400_init(void)
+static input_system_err_t ia_css_isys_2400_init(void)
 {
 	backend_channel_cfg_t backend_ch0;
 	backend_channel_cfg_t backend_ch1;
@@ -84,7 +84,7 @@ input_system_err_t ia_css_isys_2400_init(void)
 	return error;
 }
 
-input_system_err_t ia_css_isys_2401_init(void)
+static input_system_err_t ia_css_isys_2401_init(void)
 {
 	ia_css_isys_csi_rx_lut_rmgr_init();
 	ia_css_isys_ibuf_rmgr_init();
Signature · 1 line
2.41.0
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] media: atomisp: Mark ia_css_isys_240?_init() static

Hi Hans,

Quoted 43 lines · Hans de Goede

ia_css_isys_240?_init() are only used inside the C file where they are declared, mark them as static fixing:

drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c:24:20:

   warning: no previous prototype for 'ia_css_isys_2400_init'
   24 | input_system_err_t ia_css_isys_2400_init(void)
      |                    ^~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c:87:20:
   warning: no previous prototype for 'ia_css_isys_2401_init'
   87 | input_system_err_t ia_css_isys_2401_init(void)
      |                    ^~~~~~~~~~~~~~~~~~~~~
---
 .../staging/media/atomisp/pci/runtime/isys/src/isys_init.c    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_init.c +2 -3
index 1a7b45bb4544..18bfe1010989 100644
@@ -21,7 +21,7 @@
 #include "isys_dma_public.h"   /* isys2401_dma_set_max_burst_size() */
 #include "isys_irq.h"
 
-input_system_err_t ia_css_isys_2400_init(void)
+static input_system_err_t ia_css_isys_2400_init(void)
 {
        backend_channel_cfg_t backend_ch0;
        backend_channel_cfg_t backend_ch1;
@@ -84,7 +84,7 @@ input_system_err_t ia_css_isys_2400_init(void)
        return error;
 }
 
-input_system_err_t ia_css_isys_2401_init(void)
+static input_system_err_t ia_css_isys_2401_init(void)
 {
        ia_css_isys_csi_rx_lut_rmgr_init();
        ia_css_isys_ibuf_rmgr_init();
--
Quoted 2 lines

2.41.0

Thank you for working on this.

It looks good to me.

--
BR,
Kate

Reviewed-by on v1 1/3
#5 lore raw
In reply to Hans de Goede

Hi Hans.

Quoted 48 lines · Hans de Goede

isys_public.h is empty, remove it.

---
 .../hive_isp_css_include/host/isys_public.h   | 19 -------------------
 .../atomisp/pci/isp2400_input_system_public.h |  1 -
 2 files changed, 20 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h deleted +0 -19
deleted file mode 100644
index 9dacef7a5cc1..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 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.
- */
-
-#ifndef __ISYS_PUBLIC_H_INCLUDED__
-#define __ISYS_PUBLIC_H_INCLUDED__
-
-#endif /* __ISYS_PUBLIC_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/isp2400_input_system_public.h +0 -2
index 375c0db84b55..b1360eeb58df 100644
@@ -17,7 +17,6 @@
 #define __INPUT_SYSTEM_2400_PUBLIC_H_INCLUDED__
 
 #include <type_support.h>
-#include "isys_public.h"
 
 typedef struct receiver_state_s                        receiver_state_t;
 
--
Quoted 2 lines

2.41.0

Thank you for working on this.

This file can be removed and it looks for me.

Signature · 2 lines
BR,
Kate
#6 lore raw

Hi Kate,

Quoted 56 lines · Kate Hsuan

Hi Hans.

Quoted 48 lines · Hans de Goede

isys_public.h is empty, remove it.

---
 .../hive_isp_css_include/host/isys_public.h   | 19 -------------------
 .../atomisp/pci/isp2400_input_system_public.h |  1 -
 2 files changed, 20 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/isys_public.h deleted +0 -19
deleted file mode 100644
index 9dacef7a5cc1..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 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.
- */
-
-#ifndef __ISYS_PUBLIC_H_INCLUDED__
-#define __ISYS_PUBLIC_H_INCLUDED__
-
-#endif /* __ISYS_PUBLIC_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/isp2400_input_system_public.h +0 -2
index 375c0db84b55..b1360eeb58df 100644
@@ -17,7 +17,6 @@
 #define __INPUT_SYSTEM_2400_PUBLIC_H_INCLUDED__
 
 #include <type_support.h>
-#include "isys_public.h"
 
 typedef struct receiver_state_s                        receiver_state_t;
 
--
Quoted 2 lines

2.41.0

Thank you for working on this.

Quoted 3 lines

This file can be removed and it looks for me.

Thank you for the reviews.

I've pushed all 3 patches to my hansg/media-atomisp branch now.

Regards,

Hans