Shut up several smatch warnings with atomisp
Subsystems (6)
cover Shut up several smatch warnings with atomisp
The atomisp alone produces a way more warnings with smatch than all other media drivers. That prevents me to identify what's wrong on other drivers.
Cleanup the no-brain ones, in order to reduce the list to something that would be easier to handle.
Still, after this series, we have several smatch warnings, and some seem to indicate real issues:
$ make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y C=1 W=1 CHECK='/devel/smatch/smatch -p=kernel' M=drivers/staging/media drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c:127 ia_css_queue_enqueue() internal error: sval_binop_signed: MOD by zero drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c:185 ia_css_queue_dequeue() internal error: sval_binop_signed: MOD by zero drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:421 gmin_v1p2_ctrl() error: we previously assumed 'gs' could be null (see line 419) drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:455 gmin_v1p8_ctrl() error: we previously assumed 'gs' could be null (see line 453) drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:491 gmin_v2p8_ctrl() error: we previously assumed 'gs' could be null (see line 489) drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:667 gmin_get_config_var() warn: impossible condition '(*out_len > (~0)) => (0-u32max > u32max)' drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c:133 ia_css_vf_configure() warn: variable dereferenced before check 'binary' (see line 129) drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output.host.c:64 ia_css_output_config() warn: variable dereferenced before check 'from->info' (see line 63) drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1445 sh_css_update_host2sp_offline_frame() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1476 sh_css_update_host2sp_mipi_frame() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1503 sh_css_update_host2sp_mipi_metadata() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1523 sh_css_update_host2sp_num_mipi_frames() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1542 sh_css_update_host2sp_cont_num_raw_frames() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c:3017 ia_css_debug_pipe_graph_dump_sp_raw_copy() warn: argument 4 to %08lx specifier is cast from pointer drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:24:26: warning: function 'mmu_reg_store' with external linkage has definition drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:35:30: warning: function 'mmu_reg_load' with external linkage has definition drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.c:164 ia_css_eed1_8_vmem_encode() warn: assigning (-8192) to unsigned variable 'to->e_dew_enh_y[0][base + j]' drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.c:168 ia_css_eed1_8_vmem_encode() warn: assigning (-8192) to unsigned variable 'to->e_dew_enh_a[0][base + j]' drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:907 input_system_configure_channel() error: buffer overflow 'config.input_switch_cfg.hsync_data_reg' 8 <= 8 drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3808 sh_css_param_update_isp_params() error: uninitialized symbol 'stage'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4155 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4158 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 1]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4161 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 2]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4164 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 3]' drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c:324 __bo_take_off_handling() error: we previously assumed 'bo->prev' could be null (see line 297) drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:776 atomisp_open() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:913 atomisp_release() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2746 atomisp_vidioc_default() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:8094 create_host_regular_capture_pipeline() error: uninitialized symbol 'frm'.
Mauro Carvalho Chehab (7):
media: atomisp: fix ident for assert/return
media: atomisp: fix spatch warnings at sh_css.c
media: atomisp: fix switch coding style at input_system.c
media: atomisp: fix other inconsistent identing
media: atomisp: get rid of wrong stddef.h include
media: atomisp: get rid of storage_class.h
media: atomisp: make function calls cleaner
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 8 +- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 6 +- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- .../base/circbuf/interface/ia_css_circbuf.h | 39 +++++----- .../base/circbuf/interface/ia_css_circbuf_desc.h | 15 ++-- .../pci/atomisp2/css2400/camera/util/src/util.c | 2 +- .../css_2401_csi2p_system/host/csi_rx_private.h | 18 ++--- .../css2400/hive_isp_css_common/host/dma.c | 2 +- .../hive_isp_css_common/host/event_fifo_private.h | 2 +- .../hive_isp_css_common/host/fifo_monitor.c | 8 +- .../host/fifo_monitor_private.h | 28 +++---- .../css2400/hive_isp_css_common/host/gdc.c | 16 ++-- .../css2400/hive_isp_css_common/host/gp_device.c | 2 +- .../hive_isp_css_common/host/gp_device_private.h | 16 ++-- .../hive_isp_css_common/host/gpio_private.h | 4 +- .../hive_isp_css_common/host/hmem_private.h | 4 +- .../host/input_formatter_private.h | 16 ++-- .../hive_isp_css_common/host/input_system.c | 80 +++++++++---------- .../host/input_system_private.h | 64 +++++++-------- .../css2400/hive_isp_css_common/host/irq.c | 42 +++++----- .../css2400/hive_isp_css_common/host/irq_private.h | 12 +-- .../css2400/hive_isp_css_common/host/isp.c | 4 +- .../css2400/hive_isp_css_common/host/mmu.c | 6 +- .../css2400/hive_isp_css_common/host/mmu_private.h | 12 +-- .../css2400/hive_isp_css_common/host/sp_private.h | 60 +++++++------- .../css2400/hive_isp_css_include/assert_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/bamem.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/csi_rx.h | 5 -- .../atomisp2/css2400/hive_isp_css_include/debug.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/dma.h | 7 +- .../css2400/hive_isp_css_include/event_fifo.h | 7 +- .../css2400/hive_isp_css_include/fifo_monitor.h | 7 +- .../css2400/hive_isp_css_include/gdc_device.h | 7 +- .../css2400/hive_isp_css_include/gp_device.h | 7 +- .../css2400/hive_isp_css_include/gp_timer.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/gpio.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/hmem.h | 7 +- .../hive_isp_css_include/host/csi_rx_public.h | 18 ++--- .../css2400/hive_isp_css_include/host/gdc_public.h | 6 +- .../hive_isp_css_include/host/hmem_public.h | 4 +- .../css2400/hive_isp_css_include/host/isp_op1w.h | 9 +-- .../css2400/hive_isp_css_include/host/isp_op2w.h | 9 +-- .../css2400/hive_isp_css_include/host/mmu_public.h | 8 +- .../hive_isp_css_include/host/ref_vector_func.h | 9 +-- .../css2400/hive_isp_css_include/ibuf_ctrl.h | 7 +- .../css2400/hive_isp_css_include/input_formatter.h | 7 +- .../css2400/hive_isp_css_include/input_system.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/irq.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/isp.h | 7 +- .../css2400/hive_isp_css_include/isys_dma.h | 7 +- .../css2400/hive_isp_css_include/isys_irq.h | 9 +-- .../hive_isp_css_include/isys_stream2mmio.h | 7 +- .../css2400/hive_isp_css_include/math_support.h | 25 +++--- .../css2400/hive_isp_css_include/mmu_device.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/mpmath.h | 9 +-- .../atomisp2/css2400/hive_isp_css_include/osys.h | 7 +- .../css2400/hive_isp_css_include/pixelgen.h | 7 +- .../hive_isp_css_include/platform_support.h | 1 - .../css2400/hive_isp_css_include/print_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/queue.h | 7 +- .../css2400/hive_isp_css_include/resource.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/socket.h | 7 +- .../pci/atomisp2/css2400/hive_isp_css_include/sp.h | 7 +- .../css2400/hive_isp_css_include/storage_class.h | 34 -------- .../css2400/hive_isp_css_include/stream_buffer.h | 7 +- .../css2400/hive_isp_css_include/string_support.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/tag.h | 7 +- .../css2400/hive_isp_css_include/timed_ctrl.h | 7 +- .../css2400/hive_isp_css_include/type_support.h | 42 ---------- .../atomisp2/css2400/hive_isp_css_include/vamem.h | 7 +- .../css2400/hive_isp_css_include/vector_func.h | 7 +- .../css2400/hive_isp_css_include/vector_ops.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/vmem.h | 7 +- .../atomisp2/css2400/hive_isp_css_include/xmem.h | 7 +- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 12 +-- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 2 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 28 +++---- .../css2400/runtime/pipeline/src/pipeline.c | 2 +- .../css2400/runtime/rmgr/interface/ia_css_rmgr.h | 7 +- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 91 +++++++++++----------- .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 4 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 48 ++++++------ drivers/staging/media/imx/imx-media-capture.c | 2 +- 88 files changed, 490 insertions(+), 611 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/storage_class.h
Signature · 1 line
2.13.6
PATCH 1/7 media: atomisp: fix ident for assert/return
On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch:
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting
Used this small script to fix such occurrences:
for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)/\t$1/; print $_' <$i >a && mv a $i; done
--- .../pci/atomisp2/css2400/camera/util/src/util.c | 2 +- .../hive_isp_css_common/host/event_fifo_private.h | 2 +- .../host/fifo_monitor_private.h | 28 +++++----- .../css2400/hive_isp_css_common/host/gdc.c | 8 +-- .../css2400/hive_isp_css_common/host/gp_device.c | 2 +- .../hive_isp_css_common/host/gp_device_private.h | 16 +++--- .../hive_isp_css_common/host/gpio_private.h | 4 +- .../hive_isp_css_common/host/hmem_private.h | 4 +- .../host/input_formatter_private.h | 16 +++--- .../hive_isp_css_common/host/input_system.c | 28 +++++----- .../host/input_system_private.h | 64 +++++++++++----------- .../css2400/hive_isp_css_common/host/irq.c | 30 +++++----- .../css2400/hive_isp_css_common/host/irq_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/isp.c | 4 +- .../css2400/hive_isp_css_common/host/mmu.c | 6 +- .../css2400/hive_isp_css_common/host/mmu_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/sp_private.h | 60 ++++++++++---------- .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c | 2 +- drivers/staging/media/imx/imx-media-capture.c | 2 +- 19 files changed, 151 insertions(+), 151 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/src/util.c +1 -1
@@ -111,7 +111,7 @@ unsigned int ia_css_util_input_format_bpp(break ; } -return rval; +return rval; } enum ia_css_err ia_css_util_check_vf_info(
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/event_fifo_private.h +1 -1
@@ -28,7 +28,7 @@ STORAGE_CLASS_EVENT_C void event_wait_for(const event_ID_t ID)assert (ID <N_EVENT_ID );assert (event_source_addr[ID ] != ((hrt_address)-1 )); (void )ia_css_device_load_uint32 (event_source_addr[ID ]); -return ; +return ; } STORAGE_CLASS_EVENT_C void cnd_event_wait_for(const event_ID_t ID,
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor_private.h +14 -14
@@ -33,26 +33,26 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(const fifo_switch_t switch_id, const hrt_data sel) { -assert(ID == FIFO_MONITOR0_ID); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -assert (switch_id <N_FIFO_SWITCH ); + assert(ID == FIFO_MONITOR0_ID); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +assert (switch_id <N_FIFO_SWITCH ); (void )ID ;gp_device_reg_store (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id], sel); -return ; +return ; } STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(const fifo_monitor_ID_t ID ,const fifo_switch_t switch_id) { -assert (ID ==FIFO_MONITOR0_ID ); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -assert (switch_id <N_FIFO_SWITCH ); +assert (ID ==FIFO_MONITOR0_ID ); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +assert (switch_id <N_FIFO_SWITCH ); (void )ID ; -return gp_device_reg_load (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id]); +return gp_device_reg_load (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id]); }
@@ -61,19 +61,19 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_monitor_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_FIFO_MONITOR_ID); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_FIFO_MONITOR_ID); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_monitor_reg_load(const fifo_monitor_ID_t ID ,const unsigned int reg) { -assert (ID <N_FIFO_MONITOR_ID ); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_FIFO_MONITOR_ID ); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __FIFO_MONITOR_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gdc.c +4 -4
@@ -62,7 +62,7 @@ void gdc_lut_store(gdc_reg_store (ID , lut_offset++, word_0);gdc_reg_store (ID , lut_offset++, word_1); } -return ; +return ; }/*
@@ -103,7 +103,7 @@ int gdc_get_unity( {assert (ID <N_GDC_ID ); (void )ID ; -return (int )(1UL <<HRT_GDC_FRAC_BITS ); +return (int )(1UL <<HRT_GDC_FRAC_BITS ); }
@@ -116,12 +116,12 @@ STORAGE_CLASS_INLINE void gdc_reg_store( const hrt_data value) {ia_css_device_store_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_INLINE hrt_data gdc_reg_load(const gdc_ID_t ID ,const unsigned int reg) { -return ia_css_device_load_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data)); +return ia_css_device_load_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data)); }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device.c +1 -1
@@ -104,5 +104,5 @@ void gp_device_get_state( _REG_GP_SYNCGEN_FRAME_CNT_ADDR); state->soft_reset =gp_device_reg_load (ID , _REG_GP_SOFT_RESET_ADDR); -return ; +return ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device_private.h +8 -8
@@ -26,21 +26,21 @@ STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(const unsigned int reg_addr, const hrt_data value) { -assert(ID < N_GP_DEVICE_ID); -assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); + assert(ID < N_GP_DEVICE_ID); +assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 );ia_css_device_store_uint32 (GP_DEVICE_BASE [ID ] + reg_addr, value); -return ; +return ; } STORAGE_CLASS_GP_DEVICE_C hrt_data gp_device_reg_load(const gp_device_ID_t ID ,const hrt_address reg_addr) { -assert (ID <N_GP_DEVICE_ID ); -assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); -return ia_css_device_load_uint32 (GP_DEVICE_BASE [ID ] + reg_addr); +assert (ID <N_GP_DEVICE_ID ); +assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 ); +return ia_css_device_load_uint32 (GP_DEVICE_BASE [ID ] + reg_addr); }#endif /* __GP_DEVICE_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gpio_private.h +2 -2
@@ -29,7 +29,7 @@ STORAGE_CLASS_GPIO_C void gpio_reg_store(OP___assert (ID <N_GPIO_ID );OP___assert (GPIO_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
@@ -38,7 +38,7 @@ STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load( {OP___assert (ID <N_GPIO_ID );OP___assert (GPIO_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data)); +return ia_css_device_load_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __GPIO_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/hmem_private.h +2 -2
@@ -22,9 +22,9 @@ STORAGE_CLASS_HMEM_C size_t sizeof_hmem(const hmem_ID_t ID ) { -assert (ID <N_HMEM_ID ); +assert (ID <N_HMEM_ID ); (void )ID ; -return HMEM_SIZE *sizeof (hmem_data_t); +return HMEM_SIZE *sizeof (hmem_data_t); }#endif /* __HMEM_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter_private.h +8 -8
@@ -26,21 +26,21 @@ STORAGE_CLASS_INPUT_FORMATTER_C void input_formatter_reg_store(const hrt_address reg_addr, const hrt_data value) { -assert(ID < N_INPUT_FORMATTER_ID); -assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); + assert(ID < N_INPUT_FORMATTER_ID); +assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 );ia_css_device_store_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr, value); -return ; +return ; } STORAGE_CLASS_INPUT_FORMATTER_C hrt_data input_formatter_reg_load(const input_formatter_ID_t ID ,const unsigned int reg_addr) { -assert (ID <N_INPUT_FORMATTER_ID ); -assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); -return ia_css_device_load_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr); +assert (ID <N_INPUT_FORMATTER_ID ); +assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 ); +return ia_css_device_load_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr); }#endif /* __INPUT_FORMATTER_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c +14 -14
@@ -173,7 +173,7 @@ void input_system_get_state( &(state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID])); } -return ; +return ; } void receiver_get_state(
@@ -245,7 +245,7 @@ void receiver_get_state( state->be_irq_clear =receiver_reg_load (ID , _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX); -return ; +return ; } bool is_mipi_format_yuv420(
@@ -258,7 +258,7 @@ bool is_mipi_format_yuv420( (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));/* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */ -return is_yuv420; +return is_yuv420; } void receiver_set_compression(
@@ -300,7 +300,7 @@ void receiver_set_compression( reg = ((field_id <6 )?(val << (field_id *5 )):(val << ((field_id -6 ) *5 )));receiver_reg_store (ID , addr, reg); -return ; +return ; } void receiver_port_enable(
@@ -319,7 +319,7 @@ void receiver_port_enable(receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg); -return ; +return ; } bool is_receiver_port_enabled(
@@ -328,7 +328,7 @@ bool is_receiver_port_enabled( {hrt_data reg =receiver_port_reg_load (ID , port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX); -return ((reg &0x01 ) !=0 ); +return ((reg &0x01 ) !=0 ); } void receiver_irq_enable(
@@ -338,14 +338,14 @@ void receiver_irq_enable( {receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info); -return ; +return ; }rx_irq_info_t receiver_get_irq_info (const rx_ID_t ID ,const mipi_port_ID_t port_ID) { -return receiver_port_reg_load (ID , +return receiver_port_reg_load (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX); }
@@ -356,7 +356,7 @@ void receiver_irq_clear( {receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info); -return ; +return ; } STORAGE_CLASS_INLINE void capture_unit_get_state(
@@ -418,7 +418,7 @@ STORAGE_CLASS_INLINE void capture_unit_get_state( sub_id, CAPT_FSM_STATE_INFO_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void acquisition_unit_get_state(
@@ -468,7 +468,7 @@ STORAGE_CLASS_INLINE void acquisition_unit_get_state( sub_id, ACQ_INT_CNTR_INFO_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void ctrl_unit_get_state(
@@ -551,7 +551,7 @@ STORAGE_CLASS_INLINE void ctrl_unit_get_state( sub_id, ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void mipi_port_get_state(
@@ -587,7 +587,7 @@ STORAGE_CLASS_INLINE void mipi_port_get_state( state->lane_rx_count[i] = (uint8_t )((state->rx_count)>>(i*8 )); } -return ; +return ; } STORAGE_CLASS_INLINE void rx_channel_get_state(
@@ -640,7 +640,7 @@ STORAGE_CLASS_INLINE void rx_channel_get_state( state->pred[i] = (mipi_predictor_t)((val &0x18 ) >>3 ); } -return ; +return ; }// MW: "2400" in the name is not good, but this is to avoid a naming conflict
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_private.h +32 -32
116 lines not on this page · raw message
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq.c +15 -15
@@ -69,7 +69,7 @@ void irq_clear_all(irq_reg_store (ID , _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask); -return ; +return ; }/*
@@ -114,7 +114,7 @@ void irq_enable_channel(irq_wait_for_write_complete (ID ); -return ; +return ; } void irq_enable_pulse(
@@ -129,7 +129,7 @@ void irq_enable_pulse(/* output is given as edge, not pulse */ irq_reg_store (ID , _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out); -return ; +return ; } void irq_disable_channel(
@@ -160,7 +160,7 @@ void irq_disable_channel(irq_wait_for_write_complete (ID ); -return ; +return ; } enum hrt_isp_css_irq_status irq_get_channel_id(
@@ -195,7 +195,7 @@ enum hrt_isp_css_irq_status irq_get_channel_id(if (irq_id !=NULL ) *irq_id = (unsigned int )idx; -return status; +return status; }static const hrt_address IRQ_REQUEST_ADDR [N_IRQ_SW_CHANNEL_ID ] = {
@@ -220,7 +220,7 @@ void irq_raise( (unsigned int)addr, 1);gp_device_reg_store (GP_DEVICE0_ID , (unsigned int )addr,0 ); -return ; +return ; } void irq_controller_get_state(
@@ -240,7 +240,7 @@ void irq_controller_get_state( _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX); state->irq_level_not_pulse =irq_reg_load (ID , _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX); -return ; +return ; }bool any_virq_signal (void )
@@ -248,7 +248,7 @@ bool any_virq_signal(void)unsigned int irq_status =irq_reg_load (IRQ0_ID , _HRT_IRQ_CONTROLLER_STATUS_REG_IDX); -return (irq_status !=0 ); +return (irq_status !=0 ); } void cnd_virq_enable_channel(
@@ -279,7 +279,7 @@ void cnd_virq_enable_channel(irq_disable_channel (IRQ0_ID ,IRQ_NESTING_ID [ID ]); } } -return ; +return ; }
@@ -290,7 +290,7 @@ void virq_clear_all(void)for (irq_id = (irq_ID_t )0 ; irq_id <N_IRQ_ID ; irq_id++) {irq_clear_all (irq_id); } -return ; +return ; } enum hrt_isp_css_irq_status virq_get_channel_signals(
@@ -320,7 +320,7 @@ enum hrt_isp_css_irq_status virq_get_channel_signals( } } -return irq_status; +return irq_status; } void virq_clear_info(
@@ -333,7 +333,7 @@ void virq_clear_info(for (ID = (irq_ID_t )0 ;ID <N_IRQ_ID ;ID ++) { irq_info->irq_status_reg[ID ] =0 ; } -return ; +return ; } enum hrt_isp_css_irq_status virq_get_channel_id(
@@ -403,7 +403,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(if (irq_id !=NULL ) *irq_id = (virq_id_t )idx; -return status; +return status; } STORAGE_CLASS_INLINE void irq_wait_for_write_complete(
@@ -425,7 +425,7 @@ STORAGE_CLASS_INLINE bool any_irq_channel_enabled( en_reg =irq_reg_load (ID , _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX); -return (en_reg !=0 ); +return (en_reg !=0 ); } STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id(
@@ -444,5 +444,5 @@ STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id( *channel_ID = (unsigned int )irq_ID -IRQ_N_ID_OFFSET [ID ]; -return ID ; +return ID ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h +6 -6
@@ -26,19 +26,19 @@ STORAGE_CLASS_IRQ_C void irq_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_IRQ_ID); -assert (IRQ_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_IRQ_ID); +assert (IRQ_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(const irq_ID_t ID ,const unsigned int reg) { -assert (ID <N_IRQ_ID ); -assert (IRQ_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_IRQ_ID ); +assert (IRQ_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __IRQ_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp.c +2 -2
@@ -34,7 +34,7 @@ void cnd_isp_irq_enable(isp_ctrl_clearbit (ID ,ISP_IRQ_READY_REG ,ISP_IRQ_READY_BIT ); } -return ; +return ; } void isp_get_state(
@@ -94,7 +94,7 @@ void isp_get_state(!isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG, ISP_ICACHE_MT_SINK_BIT); */ -return ; +return ; }/* ISP functions to control the ISP state from the host, even in crun. */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu.c +3 -3
@@ -24,20 +24,20 @@ void mmu_set_page_table_base_index( const hrt_data base_index) {mmu_reg_store (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX, base_index); -return ; +return ; }hrt_data mmu_get_page_table_base_index (const mmu_ID_t ID ) { -return mmu_reg_load (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX); +return mmu_reg_load (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX); }void mmu_invalidate_cache (const mmu_ID_t ID ) {mmu_reg_store (ID , _HRT_MMU_INVALIDATE_TLB_REG_IDX,1 ); -return ; +return ; }void mmu_invalidate_cache_all (void )
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h +6 -6
@@ -26,19 +26,19 @@ STORAGE_CLASS_MMU_H void mmu_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_MMU_ID); -assert (MMU_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_MMU_ID); +assert (MMU_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_MMU_H hrt_data mmu_reg_load(const mmu_ID_t ID ,const unsigned int reg) { -assert (ID <N_MMU_ID ); -assert (MMU_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_MMU_ID ); +assert (MMU_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __MMU_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp_private.h +30 -30
147 lines not on this page · raw message
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_hrt.c +1 -1
@@ -80,5 +80,5 @@ enum ia_css_err sh_css_hrt_sp_wait(void)hrt_sleep (); } -return IA_CSS_SUCCESS ; +return IA_CSS_SUCCESS ; }
drivers/staging/media/imx/imx-media-capture.c +1 -1
@@ -463,7 +463,7 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)return 0 ; -return_bufs: + return_bufs:spin_lock_irqsave (&priv->q_lock, flags);list_for_each_entry_safe (buf, tmp, &priv->ready_q, list) {list_del (&buf->list);
Signature · 1 line
2.13.6
Philipp Zabel
maintainerRe: [PATCH 1/7] media: atomisp: fix ident for assert/return
Hi Mauro,
Quoted 8 lines · Mauro Carvalho Chehab
On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch:
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32irq_reg_store()warn: inconsistent indentingUsed this small script to fix such occurrences:
for i in $(git grep -l -E "^(assert|return)"
drivers/staging/media/); do perl -ne 's/^(assert|return)/\t$1/; print $_' <$i >a && mv a $i; done
This also catches labels that start with "return". Adding some whitespace to the regular expression may avoid these false positives.
Quoted 21 lines
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- .../pci/atomisp2/css2400/camera/util/src/util.c | 2 +- .../hive_isp_css_common/host/event_fifo_private.h | 2 +- .../host/fifo_monitor_private.h | 28 +++++----- .../css2400/hive_isp_css_common/host/gdc.c | 8 +-- .../css2400/hive_isp_css_common/host/gp_device.c | 2 +- .../hive_isp_css_common/host/gp_device_private.h | 16 +++--- .../hive_isp_css_common/host/gpio_private.h | 4 +- .../hive_isp_css_common/host/hmem_private.h | 4 +- .../host/input_formatter_private.h | 16 +++--- .../hive_isp_css_common/host/input_system.c | 28 +++++----- .../host/input_system_private.h | 64 +++++++++++----------- .../css2400/hive_isp_css_common/host/irq.c | 30 +++++----- .../css2400/hive_isp_css_common/host/irq_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/isp.c | 4 +- .../css2400/hive_isp_css_common/host/mmu.c | 6 +- .../css2400/hive_isp_css_common/host/mmu_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/sp_private.h | 60 ++++++++++---------- .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c | 2 +- drivers/staging/media/imx/imx-media-capture.c | 2 +-
[...]
drivers/staging/media/imx/imx-media-capture.c static int capture_start_streaming(struct vb2_queue *vq, unsigned int count) · line 469
Quoted 13 lines
drivers/staging/media/imx/imx-media-capture.c +1
-1@@ -463,7 +463,7 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)return 0 ; -return_bufs: + return_bufs:spin_lock_irqsave (&priv->q_lock, flags);list_for_each_entry_safe (buf, tmp, &priv->ready_q, list) {list_del (&buf->list);
This label should stay at the first column.
regards
Philipp
Re: [PATCH 1/7] media: atomisp: fix ident for assert/return
Em Wed, 01 Nov 2017 10:16:57 +0100
Philipp Zabel <[email protected]> escreveu:
Quoted 15 lines
Hi Mauro,
Quoted 8 lines · Mauro Carvalho Chehab
On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch:
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32irq_reg_store()warn: inconsistent indentingUsed this small script to fix such occurrences:
for i in $(git grep -l -E "^(assert|return)"
drivers/staging/media/); do perl -ne 's/^(assert|return)/\t$1/; print $_' <$i >a && mv a $i; doneThis also catches labels that start with "return". Adding some whitespace to the regular expression may avoid these false positives.
Quoted 7 lines
Review
Quoted 5 lines
(quoted diff) +1
-1-return_bufs: + return_bufs: spin_lock_irqsave(&priv->q_lock, flags); list_for_each_entry_safe(buf, tmp, &priv->ready_q, list) { list_del(&buf->list);This label should stay at the first column.
Good catch! I was not expecting a label named "return_foo" :-)
I added a \b in order to detect word bound:
for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)\b/\t$1/; print $_' <$i >a && mv a $i; done
That fixed the regex and it didn't catch the return_bufs anymore.
New version enclosed.
Thanks,
Mauro
[PATCH] media: atomisp: fix ident for assert/return
On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch:
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting
Used this small script to fix such occurrences:
for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)\b/\t$1/; print $_' <$i >a && mv a $i; done
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/src/util.c +1 -1
@@ -111,7 +111,7 @@ unsigned int ia_css_util_input_format_bpp(break ; } -return rval; +return rval; } enum ia_css_err ia_css_util_check_vf_info(
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/event_fifo_private.h +1 -1
@@ -28,7 +28,7 @@ STORAGE_CLASS_EVENT_C void event_wait_for(const event_ID_t ID)assert (ID <N_EVENT_ID );assert (event_source_addr[ID ] != ((hrt_address)-1 )); (void )ia_css_device_load_uint32 (event_source_addr[ID ]); -return ; +return ; } STORAGE_CLASS_EVENT_C void cnd_event_wait_for(const event_ID_t ID,
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor_private.h +14 -14
@@ -33,26 +33,26 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(const fifo_switch_t switch_id, const hrt_data sel) { -assert(ID == FIFO_MONITOR0_ID); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -assert (switch_id <N_FIFO_SWITCH ); + assert(ID == FIFO_MONITOR0_ID); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +assert (switch_id <N_FIFO_SWITCH ); (void )ID ;gp_device_reg_store (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id], sel); -return ; +return ; } STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(const fifo_monitor_ID_t ID ,const fifo_switch_t switch_id) { -assert (ID ==FIFO_MONITOR0_ID ); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -assert (switch_id <N_FIFO_SWITCH ); +assert (ID ==FIFO_MONITOR0_ID ); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +assert (switch_id <N_FIFO_SWITCH ); (void )ID ; -return gp_device_reg_load (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id]); +return gp_device_reg_load (GP_DEVICE0_ID ,FIFO_SWITCH_ADDR [switch_id]); }
@@ -61,19 +61,19 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_monitor_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_FIFO_MONITOR_ID); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_FIFO_MONITOR_ID); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_monitor_reg_load(const fifo_monitor_ID_t ID ,const unsigned int reg) { -assert (ID <N_FIFO_MONITOR_ID ); -assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_FIFO_MONITOR_ID ); +assert (FIFO_MONITOR_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (FIFO_MONITOR_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __FIFO_MONITOR_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gdc.c +4 -4
@@ -62,7 +62,7 @@ void gdc_lut_store(gdc_reg_store (ID , lut_offset++, word_0);gdc_reg_store (ID , lut_offset++, word_1); } -return ; +return ; }/*
@@ -103,7 +103,7 @@ int gdc_get_unity( {assert (ID <N_GDC_ID ); (void )ID ; -return (int )(1UL <<HRT_GDC_FRAC_BITS ); +return (int )(1UL <<HRT_GDC_FRAC_BITS ); }
@@ -116,12 +116,12 @@ STORAGE_CLASS_INLINE void gdc_reg_store( const hrt_data value) {ia_css_device_store_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_INLINE hrt_data gdc_reg_load(const gdc_ID_t ID ,const unsigned int reg) { -return ia_css_device_load_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data)); +return ia_css_device_load_uint32 (GDC_BASE [ID ] + reg*sizeof (hrt_data)); }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device.c +1 -1
@@ -104,5 +104,5 @@ void gp_device_get_state( _REG_GP_SYNCGEN_FRAME_CNT_ADDR); state->soft_reset =gp_device_reg_load (ID , _REG_GP_SOFT_RESET_ADDR); -return ; +return ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device_private.h +8 -8
@@ -26,21 +26,21 @@ STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(const unsigned int reg_addr, const hrt_data value) { -assert(ID < N_GP_DEVICE_ID); -assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); + assert(ID < N_GP_DEVICE_ID); +assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 );ia_css_device_store_uint32 (GP_DEVICE_BASE [ID ] + reg_addr, value); -return ; +return ; } STORAGE_CLASS_GP_DEVICE_C hrt_data gp_device_reg_load(const gp_device_ID_t ID ,const hrt_address reg_addr) { -assert (ID <N_GP_DEVICE_ID ); -assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); -return ia_css_device_load_uint32 (GP_DEVICE_BASE [ID ] + reg_addr); +assert (ID <N_GP_DEVICE_ID ); +assert (GP_DEVICE_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 ); +return ia_css_device_load_uint32 (GP_DEVICE_BASE [ID ] + reg_addr); }#endif /* __GP_DEVICE_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gpio_private.h +2 -2
@@ -29,7 +29,7 @@ STORAGE_CLASS_GPIO_C void gpio_reg_store(OP___assert (ID <N_GPIO_ID );OP___assert (GPIO_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
@@ -38,7 +38,7 @@ STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load( {OP___assert (ID <N_GPIO_ID );OP___assert (GPIO_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data)); +return ia_css_device_load_uint32 (GPIO_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __GPIO_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/hmem_private.h +2 -2
@@ -22,9 +22,9 @@ STORAGE_CLASS_HMEM_C size_t sizeof_hmem(const hmem_ID_t ID ) { -assert (ID <N_HMEM_ID ); +assert (ID <N_HMEM_ID ); (void )ID ; -return HMEM_SIZE *sizeof (hmem_data_t); +return HMEM_SIZE *sizeof (hmem_data_t); }#endif /* __HMEM_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter_private.h +8 -8
@@ -26,21 +26,21 @@ STORAGE_CLASS_INPUT_FORMATTER_C void input_formatter_reg_store(const hrt_address reg_addr, const hrt_data value) { -assert(ID < N_INPUT_FORMATTER_ID); -assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); + assert(ID < N_INPUT_FORMATTER_ID); +assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 );ia_css_device_store_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr, value); -return ; +return ; } STORAGE_CLASS_INPUT_FORMATTER_C hrt_data input_formatter_reg_load(const input_formatter_ID_t ID ,const unsigned int reg_addr) { -assert (ID <N_INPUT_FORMATTER_ID ); -assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); -assert ((reg_addr %sizeof (hrt_data)) ==0 ); -return ia_css_device_load_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr); +assert (ID <N_INPUT_FORMATTER_ID ); +assert (INPUT_FORMATTER_BASE [ID ] != (hrt_address)-1 ); +assert ((reg_addr %sizeof (hrt_data)) ==0 ); +return ia_css_device_load_uint32 (INPUT_FORMATTER_BASE [ID ] + reg_addr); }#endif /* __INPUT_FORMATTER_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c +14 -14
@@ -173,7 +173,7 @@ void input_system_get_state( &(state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID])); } -return ; +return ; } void receiver_get_state(
@@ -245,7 +245,7 @@ void receiver_get_state( state->be_irq_clear =receiver_reg_load (ID , _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX); -return ; +return ; } bool is_mipi_format_yuv420(
@@ -258,7 +258,7 @@ bool is_mipi_format_yuv420( (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));/* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */ -return is_yuv420; +return is_yuv420; } void receiver_set_compression(
@@ -300,7 +300,7 @@ void receiver_set_compression( reg = ((field_id <6 )?(val << (field_id *5 )):(val << ((field_id -6 ) *5 )));receiver_reg_store (ID , addr, reg); -return ; +return ; } void receiver_port_enable(
@@ -319,7 +319,7 @@ void receiver_port_enable(receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg); -return ; +return ; } bool is_receiver_port_enabled(
@@ -328,7 +328,7 @@ bool is_receiver_port_enabled( {hrt_data reg =receiver_port_reg_load (ID , port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX); -return ((reg &0x01 ) !=0 ); +return ((reg &0x01 ) !=0 ); } void receiver_irq_enable(
@@ -338,14 +338,14 @@ void receiver_irq_enable( {receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info); -return ; +return ; }rx_irq_info_t receiver_get_irq_info (const rx_ID_t ID ,const mipi_port_ID_t port_ID) { -return receiver_port_reg_load (ID , +return receiver_port_reg_load (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX); }
@@ -356,7 +356,7 @@ void receiver_irq_clear( {receiver_port_reg_store (ID , port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info); -return ; +return ; } STORAGE_CLASS_INLINE void capture_unit_get_state(
@@ -418,7 +418,7 @@ STORAGE_CLASS_INLINE void capture_unit_get_state( sub_id, CAPT_FSM_STATE_INFO_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void acquisition_unit_get_state(
@@ -468,7 +468,7 @@ STORAGE_CLASS_INLINE void acquisition_unit_get_state( sub_id, ACQ_INT_CNTR_INFO_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void ctrl_unit_get_state(
@@ -551,7 +551,7 @@ STORAGE_CLASS_INLINE void ctrl_unit_get_state( sub_id, ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID); -return ; +return ; } STORAGE_CLASS_INLINE void mipi_port_get_state(
@@ -587,7 +587,7 @@ STORAGE_CLASS_INLINE void mipi_port_get_state( state->lane_rx_count[i] = (uint8_t )((state->rx_count)>>(i*8 )); } -return ; +return ; } STORAGE_CLASS_INLINE void rx_channel_get_state(
@@ -640,7 +640,7 @@ STORAGE_CLASS_INLINE void rx_channel_get_state( state->pred[i] = (mipi_predictor_t)((val &0x18 ) >>3 ); } -return ; +return ; }// MW: "2400" in the name is not good, but this is to avoid a naming conflict
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_private.h +32 -32
116 lines not on this page · raw message
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq.c +15 -15
@@ -69,7 +69,7 @@ void irq_clear_all(irq_reg_store (ID , _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask); -return ; +return ; }/*
@@ -114,7 +114,7 @@ void irq_enable_channel(irq_wait_for_write_complete (ID ); -return ; +return ; } void irq_enable_pulse(
@@ -129,7 +129,7 @@ void irq_enable_pulse(/* output is given as edge, not pulse */ irq_reg_store (ID , _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out); -return ; +return ; } void irq_disable_channel(
@@ -160,7 +160,7 @@ void irq_disable_channel(irq_wait_for_write_complete (ID ); -return ; +return ; } enum hrt_isp_css_irq_status irq_get_channel_id(
@@ -195,7 +195,7 @@ enum hrt_isp_css_irq_status irq_get_channel_id(if (irq_id !=NULL ) *irq_id = (unsigned int )idx; -return status; +return status; }static const hrt_address IRQ_REQUEST_ADDR [N_IRQ_SW_CHANNEL_ID ] = {
@@ -220,7 +220,7 @@ void irq_raise( (unsigned int)addr, 1);gp_device_reg_store (GP_DEVICE0_ID , (unsigned int )addr,0 ); -return ; +return ; } void irq_controller_get_state(
@@ -240,7 +240,7 @@ void irq_controller_get_state( _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX); state->irq_level_not_pulse =irq_reg_load (ID , _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX); -return ; +return ; }bool any_virq_signal (void )
@@ -248,7 +248,7 @@ bool any_virq_signal(void)unsigned int irq_status =irq_reg_load (IRQ0_ID , _HRT_IRQ_CONTROLLER_STATUS_REG_IDX); -return (irq_status !=0 ); +return (irq_status !=0 ); } void cnd_virq_enable_channel(
@@ -279,7 +279,7 @@ void cnd_virq_enable_channel(irq_disable_channel (IRQ0_ID ,IRQ_NESTING_ID [ID ]); } } -return ; +return ; }
@@ -290,7 +290,7 @@ void virq_clear_all(void)for (irq_id = (irq_ID_t )0 ; irq_id <N_IRQ_ID ; irq_id++) {irq_clear_all (irq_id); } -return ; +return ; } enum hrt_isp_css_irq_status virq_get_channel_signals(
@@ -320,7 +320,7 @@ enum hrt_isp_css_irq_status virq_get_channel_signals( } } -return irq_status; +return irq_status; } void virq_clear_info(
@@ -333,7 +333,7 @@ void virq_clear_info(for (ID = (irq_ID_t )0 ;ID <N_IRQ_ID ;ID ++) { irq_info->irq_status_reg[ID ] =0 ; } -return ; +return ; } enum hrt_isp_css_irq_status virq_get_channel_id(
@@ -403,7 +403,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(if (irq_id !=NULL ) *irq_id = (virq_id_t )idx; -return status; +return status; } STORAGE_CLASS_INLINE void irq_wait_for_write_complete(
@@ -425,7 +425,7 @@ STORAGE_CLASS_INLINE bool any_irq_channel_enabled( en_reg =irq_reg_load (ID , _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX); -return (en_reg !=0 ); +return (en_reg !=0 ); } STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id(
@@ -444,5 +444,5 @@ STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id( *channel_ID = (unsigned int )irq_ID -IRQ_N_ID_OFFSET [ID ]; -return ID ; +return ID ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h +6 -6
@@ -26,19 +26,19 @@ STORAGE_CLASS_IRQ_C void irq_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_IRQ_ID); -assert (IRQ_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_IRQ_ID); +assert (IRQ_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(const irq_ID_t ID ,const unsigned int reg) { -assert (ID <N_IRQ_ID ); -assert (IRQ_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_IRQ_ID ); +assert (IRQ_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (IRQ_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __IRQ_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp.c +2 -2
@@ -34,7 +34,7 @@ void cnd_isp_irq_enable(isp_ctrl_clearbit (ID ,ISP_IRQ_READY_REG ,ISP_IRQ_READY_BIT ); } -return ; +return ; } void isp_get_state(
@@ -94,7 +94,7 @@ void isp_get_state(!isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG, ISP_ICACHE_MT_SINK_BIT); */ -return ; +return ; }/* ISP functions to control the ISP state from the host, even in crun. */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu.c +3 -3
@@ -24,20 +24,20 @@ void mmu_set_page_table_base_index( const hrt_data base_index) {mmu_reg_store (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX, base_index); -return ; +return ; }hrt_data mmu_get_page_table_base_index (const mmu_ID_t ID ) { -return mmu_reg_load (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX); +return mmu_reg_load (ID , _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX); }void mmu_invalidate_cache (const mmu_ID_t ID ) {mmu_reg_store (ID , _HRT_MMU_INVALIDATE_TLB_REG_IDX,1 ); -return ; +return ; }void mmu_invalidate_cache_all (void )
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h +6 -6
@@ -26,19 +26,19 @@ STORAGE_CLASS_MMU_H void mmu_reg_store(const unsigned int reg, const hrt_data value) { -assert(ID < N_MMU_ID); -assert (MMU_BASE [ID ] != (hrt_address)-1 ); + assert(ID < N_MMU_ID); +assert (MMU_BASE [ID ] != (hrt_address)-1 );ia_css_device_store_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data), value); -return ; +return ; } STORAGE_CLASS_MMU_H hrt_data mmu_reg_load(const mmu_ID_t ID ,const unsigned int reg) { -assert (ID <N_MMU_ID ); -assert (MMU_BASE [ID ] != (hrt_address)-1 ); -return ia_css_device_load_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data)); +assert (ID <N_MMU_ID ); +assert (MMU_BASE [ID ] != (hrt_address)-1 ); +return ia_css_device_load_uint32 (MMU_BASE [ID ] + reg*sizeof (hrt_data)); }#endif /* __MMU_PRIVATE_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp_private.h +30 -30
147 lines not on this page · raw message
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_hrt.c +1 -1
@@ -80,5 +80,5 @@ enum ia_css_err sh_css_hrt_sp_wait(void)hrt_sleep (); } -return IA_CSS_SUCCESS ; +return IA_CSS_SUCCESS ; }
PATCH 2/7 media: atomisp: fix spatch warnings at sh_css.c
In reply to Mauro Carvalho Chehabdrivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5801:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5803:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:3795 create_host_acc_pipeline() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:4343 ia_css_pipe_enqueue_buffer() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:6029 sh_css_pipe_configure_viewfinder() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:8693 ia_css_stream_capture() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9781 ia_css_stream_create() warn: if statement not indented drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9988 ia_css_stream_load() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:10525 ia_css_update_continuous_frames() warn: inconsistent indenting
--- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 91 +++++++++++----------- 1 file changed, 46 insertions(+), 45 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +46 -45
@@ -3779,6 +3779,7 @@ static enum ia_css_err create_host_acc_pipeline(struct ia_css_pipe *pipe) {enum ia_css_err err =IA_CSS_SUCCESS ; +const struct ia_css_fw_info *fw;unsigned int i;IA_CSS_ENTER_PRIVATE ("pipe = %p" , pipe);
@@ -3792,14 +3793,12 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe)if (pipe->config.acc_extension) pipe->pipeline.pipe_qos_config =0 ; -{ -const struct ia_css_fw_info *fw = pipe->vf_stage; + fw = pipe->vf_stage;for (i =0 ; fw; fw = fw->next){ err =sh_css_pipeline_add_acc_stage (&pipe->pipeline, fw);if (err !=IA_CSS_SUCCESS ) goto ERR; } -}for (i=0 ; i<pipe->config.num_acc_stages; i++) {struct ia_css_fw_info *fw = pipe->config.acc_stages[i];
@@ -4331,12 +4330,13 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe, } } }else if ((buf_type ==IA_CSS_BUFFER_TYPE_INPUT_FRAME ) - || (buf_type ==IA_CSS_BUFFER_TYPE_OUTPUT_FRAME ) - || (buf_type ==IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME ) - || (buf_type ==IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME ) - || (buf_type ==IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME ) - || (buf_type ==IA_CSS_BUFFER_TYPE_METADATA )) { - return_err =ia_css_bufq_enqueue_buffer (thread_id, + || (buf_type ==IA_CSS_BUFFER_TYPE_OUTPUT_FRAME ) + || (buf_type ==IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME ) + || (buf_type ==IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME ) + || (buf_type ==IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME ) + || (buf_type ==IA_CSS_BUFFER_TYPE_METADATA )) { + + return_err =ia_css_bufq_enqueue_buffer (thread_id, queue_id, (uint32_t )h_vbuf->vptr);#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS )
@@ -5795,13 +5795,15 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)#endif /* Make tnr reference buffers output block height align */ - tnr_info.res.height =#ifndef ISP2401 + tnr_info.res.height =CEIL_MUL (tnr_info.res.height, + mycs->video_binary.info->sp.block.output_block_height);#else + tnr_info.res.height =CEIL_MUL (tnr_height, + mycs->video_binary.info->sp.block.output_block_height);#endif - mycs->video_binary.info->sp.block.output_block_height); }else { tnr_info = mycs->video_binary.internal_frame_info; }
@@ -6025,7 +6027,7 @@ sh_css_pipe_configure_viewfinder(struct ia_css_pipe *pipe, unsigned int width, err =ia_css_util_check_res (width, height);if (err !=IA_CSS_SUCCESS ) { -IA_CSS_LEAVE_ERR_PRIVATE (err); +IA_CSS_LEAVE_ERR_PRIVATE (err);return err; } if (pipe->vf_output_info[idx].res.width != width ||
@@ -8687,9 +8689,9 @@ enum ia_css_err ia_css_stream_capture(/* Check if the tag descriptor is valid */ if (num_captures <SH_CSS_MINIMUM_TAG_ID ) { -ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE , -"ia_css_stream_capture() leave: return_err=%d\n" , -IA_CSS_ERR_INVALID_ARGUMENTS ); +ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE , +"ia_css_stream_capture() leave: return_err=%d\n" , +IA_CSS_ERR_INVALID_ARGUMENTS );return IA_CSS_ERR_INVALID_ARGUMENTS ; }
@@ -9778,23 +9780,22 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,if (err ==IA_CSS_SUCCESS ) {/* working mode: enter into the seed list */ -if (my_css_save.mode == sh_css_mode_working) -for (i =0 ; i <MAX_ACTIVE_STREAMS ; i++) -if (my_css_save.stream_seeds[i].stream ==NULL ) - { -IA_CSS_LOG ("entered stream into loc=%d" , i); - my_css_save.stream_seeds[i].orig_stream = stream; - my_css_save.stream_seeds[i].stream = curr_stream; - my_css_save.stream_seeds[i].num_pipes = num_pipes; - my_css_save.stream_seeds[i].stream_config = *stream_config; -for (j =0 ; j < num_pipes; j++) - { - my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config; - my_css_save.stream_seeds[i].pipes[j] = pipes[j]; - my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j]; - } -break ; +if (my_css_save.mode == sh_css_mode_working) { +for (i =0 ; i <MAX_ACTIVE_STREAMS ; i++) +if (!my_css_save.stream_seeds[i].stream) { +IA_CSS_LOG ("entered stream into loc=%d" , i); + my_css_save.stream_seeds[i].orig_stream = stream; + my_css_save.stream_seeds[i].stream = curr_stream; + my_css_save.stream_seeds[i].num_pipes = num_pipes; + my_css_save.stream_seeds[i].stream_config = *stream_config; +for (j =0 ; j < num_pipes; j++) { + my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config; + my_css_save.stream_seeds[i].pipes[j] = pipes[j]; + my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j]; + } +break ; } + }#else if (err ==IA_CSS_SUCCESS ) { err =ia_css_save_stream (curr_stream);
@@ -9968,32 +9969,32 @@ ia_css_stream_load(struct ia_css_stream *stream)enum ia_css_err err;assert (stream !=NULL );ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"ia_css_stream_load() enter, \n" ); -for (i=0 ;i<MAX_ACTIVE_STREAMS ;i++) -if (my_css_save.stream_seeds[i].stream == stream) - { +for (i =0 ; i <MAX_ACTIVE_STREAMS ; i++) { +if (my_css_save.stream_seeds[i].stream == stream) {int j; -for (j=0 ;j<my_css_save.stream_seeds[i].num_pipes;j++) -if ((err =ia_css_pipe_create (&(my_css_save.stream_seeds[i].pipe_config[j]), &my_css_save.stream_seeds[i].pipes[j])) !=IA_CSS_SUCCESS ) - { -if (j) - { +for ( j =0 ; j < my_css_save.stream_seeds[i].num_pipes; j++) { +if ((err =ia_css_pipe_create (&(my_css_save.stream_seeds[i].pipe_config[j]), &my_css_save.stream_seeds[i].pipes[j])) !=IA_CSS_SUCCESS ) { +if (j) {int k;for (k=0 ;k<j;k++)ia_css_pipe_destroy (my_css_save.stream_seeds[i].pipes[k]); }return err; } - err =ia_css_stream_create (&(my_css_save.stream_seeds[i].stream_config), my_css_save.stream_seeds[i].num_pipes, - my_css_save.stream_seeds[i].pipes, &(my_css_save.stream_seeds[i].stream)); -if (err !=IA_CSS_SUCCESS ) - { + } + err =ia_css_stream_create (&(my_css_save.stream_seeds[i].stream_config), + my_css_save.stream_seeds[i].num_pipes, + my_css_save.stream_seeds[i].pipes, + &(my_css_save.stream_seeds[i].stream)); +if (err !=IA_CSS_SUCCESS ) {ia_css_stream_destroy (stream); -for (j=0 ;j<my_css_save.stream_seeds[i].num_pipes;j++) +for (j =0 ; j < my_css_save.stream_seeds[i].num_pipes; j++)ia_css_pipe_destroy (my_css_save.stream_seeds[i].pipes[j]);return err; }break ; } + }ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"ia_css_stream_load() exit, \n" );return IA_CSS_SUCCESS ;#else
@@ -10522,7 +10523,7 @@ ia_css_update_continuous_frames(struct ia_css_stream *stream)ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"sh_css_update_continuous_frames() leave: invalid stream, return_void\n" ); -return IA_CSS_ERR_INVALID_ARGUMENTS ; +return IA_CSS_ERR_INVALID_ARGUMENTS ; } pipe = stream->continuous_pipe;
Signature · 1 line
2.13.6
PATCH 3/7 media: atomisp: fix switch coding style at input_system.c
In reply to Mauro Carvalho ChehabFix a switch at input_system.c that were causing smatch warnings:
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting
--- .../hive_isp_css_common/host/input_system.c | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c +16 -16
@@ -602,30 +602,30 @@ STORAGE_CLASS_INLINE void rx_channel_get_state(assert (state !=NULL );switch (ch_id) { -case 0 : - state->comp_scheme0 =receiver_reg_load (ID , +case 0 : + state->comp_scheme0 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX); - state->comp_scheme1 =receiver_reg_load (ID , + state->comp_scheme1 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX); -break ; -case 1 : - state->comp_scheme0 =receiver_reg_load (ID , +break ; +case 1 : + state->comp_scheme0 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX); - state->comp_scheme1 =receiver_reg_load (ID , + state->comp_scheme1 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX); -break ; -case 2 : - state->comp_scheme0 =receiver_reg_load (ID , +break ; +case 2 : + state->comp_scheme0 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX); - state->comp_scheme1 =receiver_reg_load (ID , + state->comp_scheme1 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX); -break ; -case 3 : - state->comp_scheme0 =receiver_reg_load (ID , +break ; +case 3 : + state->comp_scheme0 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX); - state->comp_scheme1 =receiver_reg_load (ID , + state->comp_scheme1 =receiver_reg_load (ID , _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX); -break ; +break ; }/* See Table 7.1.17,..., 7.1.24 */
Signature · 1 line
2.13.6
PATCH 4/7 media: atomisp: fix other inconsistent identing
In reply to Mauro Carvalho ChehabAs reported by smatch:
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c:607 pipeline_stage_create() warn: inconsistent indenting drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:255 ov2680_write_reg_array() warn: inconsistent indenting drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:401 __ov2680_set_exposure() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4269 sh_css_params_write_to_ddr_internal() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:1008 atomisp_register_entities() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c:1709 ia_css_binary_find() warn: inconsistent indenting
--- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 8 ++-- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 12 +++--- .../css2400/runtime/pipeline/src/pipeline.c | 2 +- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 48 +++++++++++----------- 7 files changed, 40 insertions(+), 38 deletions(-)
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +5 -3
@@ -252,8 +252,8 @@ static int ov2680_write_reg_array(struct i2c_client *client,if (!__ov2680_write_reg_is_consecutive (client, &ctrl, next)) { err =__ov2680_flush_reg_array (client, &ctrl); -if (err) -return err; +if (err) +return err; } err =__ov2680_buf_reg_array (client, &ctrl, next);if (err) {
@@ -398,7 +398,9 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,u16 vts,hts;int ret,exp_val; -dev_dbg (&client->dev,"+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n" ,coarse_itg, gain, digitgain); +dev_dbg (&client->dev, +"+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n" , + coarse_itg, gain, digitgain); hts = ov2680_res[dev->fmt_idx].pixels_per_line; vts = ov2680_res[dev->fmt_idx].lines_per_frame;
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +2 -2
@@ -386,8 +386,8 @@ static int ov5693_write_reg_array(struct i2c_client *client,if (!__ov5693_write_reg_is_consecutive (client, &ctrl, next)) { err =__ov5693_flush_reg_array (client, &ctrl); -if (err) -return err; +if (err) +return err; } err =__ov5693_buf_reg_array (client, &ctrl, next);if (err) {
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +1 -1
@@ -1004,7 +1004,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)v4l2_device_unregister (&isp->v4l2_dev); v4l2_device_failed:media_device_unregister (&isp->media_dev); -media_device_cleanup (&isp->media_dev); +media_device_cleanup (&isp->media_dev);return ret; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c +6 -6
@@ -1697,11 +1697,11 @@ ia_css_binary_find(struct ia_css_binary_descr *descr, }#endif if (xcandidate->num_output_pins >1 &&/* in case we have a second output pin, */ - req_vf_info &&/* and we need vf output. */ + req_vf_info &&/* and we need vf output. */ /* check if the required vf format is supported. */ - !binary_supports_output_format (xcandidate, req_vf_info->format)) { - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, + !binary_supports_output_format (xcandidate, req_vf_info->format)) { + ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n", __LINE__, xcandidate->num_output_pins, 1, req_vf_info,
@@ -1711,8 +1711,8 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,/* Check if vf_veceven supports the requested vf format */ if (xcandidate->num_output_pins ==1 && - req_vf_info && candidate->enable.vf_veceven && - !binary_supports_vf_format (xcandidate, req_vf_info->format)) { + req_vf_info && candidate->enable.vf_veceven && + !binary_supports_vf_format (xcandidate, req_vf_info->format)) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n", __LINE__, xcandidate->num_output_pins, 1,
@@ -1723,7 +1723,7 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,/* Check if vf_veceven supports the requested vf width */ if (xcandidate->num_output_pins ==1 && - req_vf_info && candidate->enable.vf_veceven) {/* and we need vf output. */ + req_vf_info && candidate->enable.vf_veceven) {/* and we need vf output. */ if (req_vf_info->res.width > candidate->output.max_width) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_binary_find() [%d] continue: (%d < %d)\n",
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c +1 -1
@@ -603,7 +603,7 @@ static enum ia_css_err pipeline_stage_create(/* Verify input parameters*/ if (!(stage_desc->in_frame) && !(stage_desc->firmware) && (stage_desc->binary) && !(stage_desc->binary->online)) { - err =IA_CSS_ERR_INTERNAL_ERROR ; + err =IA_CSS_ERR_INTERNAL_ERROR ; goto ERR; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c +1 -1
@@ -174,7 +174,7 @@ void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool)ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"ia_css_rmgr_uninit_vbuf()\n" );if (pool ==NULL ) {ia_css_debug_dtrace (IA_CSS_DEBUG_ERROR ,"ia_css_rmgr_uninit_vbuf(): NULL argument\n" ); -return ; +return ; }if (pool->handles !=NULL ) {/* free the hmm buffers */
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c +24 -24
57 lines not on this page · raw message
Signature · 1 line
2.13.6
PATCH 5/7 media: atomisp: get rid of wrong stddef.h include
In reply to Mauro Carvalho ChehabThe places at atomisp.h that use stddef.h are wrong: the types it needs are actually defined at linux/types.h. Also, it causes lots of smatch warnings due to the redefinition of ofsetof() macro:
/opt/gcc-7.1.0/x86/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include/stddef.h:417:9: warning: preprocessor token offsetof redefined ./include/linux/stddef.h:16:9: this was the original definition
--- .../css2400/hive_isp_css_common/host/dma.c | 2 +- .../hive_isp_css_include/host/hmem_public.h | 4 +-- .../css2400/hive_isp_css_include/type_support.h | 42 ---------------------- 3 files changed, 3 insertions(+), 45 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/dma.c +1 -1
@@ -12,7 +12,7 @@* more details. */ -#include <stddef.h> /* NULL */ +#include <linux/kernel.h> #include "dma.h"
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/hmem_public.h +2 -2
@@ -15,10 +15,10 @@#ifndef __HMEM_PUBLIC_H_INCLUDED__#define __HMEM_PUBLIC_H_INCLUDED__ -#include <stddef.h> /* size_t */ +#include <linux/types.h> /* size_t */ /*! Return the size of HMEM[ID] -+ \param ID[in] HMEM identifier \Note: The size is the byte size of the area it occupies
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/type_support.h +0 -42
52 lines not on this page · raw message
Signature · 1 line
2.13.6
PATCH 6/7 media: atomisp: get rid of storage_class.h
In reply to Mauro Carvalho ChehabDon't hide function declaration on ugly macros.
--- .../base/circbuf/interface/ia_css_circbuf.h | 39 +++++++++++----------- .../base/circbuf/interface/ia_css_circbuf_desc.h | 15 ++++----- .../css_2401_csi2p_system/host/csi_rx_private.h | 18 +++++----- .../hive_isp_css_common/host/fifo_monitor.c | 8 ++--- .../css2400/hive_isp_css_common/host/gdc.c | 8 ++--- .../hive_isp_css_common/host/input_system.c | 20 +++++------ .../css2400/hive_isp_css_common/host/irq.c | 12 +++---- .../css2400/hive_isp_css_include/assert_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/bamem.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/csi_rx.h | 5 --- .../atomisp2/css2400/hive_isp_css_include/debug.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/dma.h | 7 ++-- .../css2400/hive_isp_css_include/event_fifo.h | 7 ++-- .../css2400/hive_isp_css_include/fifo_monitor.h | 7 ++-- .../css2400/hive_isp_css_include/gdc_device.h | 7 ++-- .../css2400/hive_isp_css_include/gp_device.h | 7 ++-- .../css2400/hive_isp_css_include/gp_timer.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/gpio.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/hmem.h | 7 ++-- .../hive_isp_css_include/host/csi_rx_public.h | 18 +++++----- .../css2400/hive_isp_css_include/host/gdc_public.h | 6 ++-- .../css2400/hive_isp_css_include/host/isp_op1w.h | 9 +++-- .../css2400/hive_isp_css_include/host/isp_op2w.h | 9 +++-- .../css2400/hive_isp_css_include/host/mmu_public.h | 8 ++--- .../hive_isp_css_include/host/ref_vector_func.h | 9 +++-- .../css2400/hive_isp_css_include/ibuf_ctrl.h | 7 ++-- .../css2400/hive_isp_css_include/input_formatter.h | 7 ++-- .../css2400/hive_isp_css_include/input_system.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/irq.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/isp.h | 7 ++-- .../css2400/hive_isp_css_include/isys_dma.h | 7 ++-- .../css2400/hive_isp_css_include/isys_irq.h | 9 +++-- .../hive_isp_css_include/isys_stream2mmio.h | 7 ++-- .../css2400/hive_isp_css_include/math_support.h | 25 +++++++------- .../css2400/hive_isp_css_include/mmu_device.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/mpmath.h | 9 +++-- .../atomisp2/css2400/hive_isp_css_include/osys.h | 7 ++-- .../css2400/hive_isp_css_include/pixelgen.h | 7 ++-- .../hive_isp_css_include/platform_support.h | 1 - .../css2400/hive_isp_css_include/print_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/queue.h | 7 ++-- .../css2400/hive_isp_css_include/resource.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/socket.h | 7 ++-- .../pci/atomisp2/css2400/hive_isp_css_include/sp.h | 7 ++-- .../css2400/hive_isp_css_include/storage_class.h | 34 ------------------- .../css2400/hive_isp_css_include/stream_buffer.h | 7 ++-- .../css2400/hive_isp_css_include/string_support.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/tag.h | 7 ++-- .../css2400/hive_isp_css_include/timed_ctrl.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/vamem.h | 7 ++-- .../css2400/hive_isp_css_include/vector_func.h | 7 ++-- .../css2400/hive_isp_css_include/vector_ops.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/vmem.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/xmem.h | 7 ++-- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 2 +- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 2 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 28 ++++++++-------- .../css2400/runtime/rmgr/interface/ia_css_rmgr.h | 7 ++-- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 4 +-- 60 files changed, 230 insertions(+), 314 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/storage_class.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h +19 -20
@@ -18,7 +18,6 @@#include <sp.h> #include <type_support.h> #include <math_support.h> -#include <storage_class.h> #include <assert_support.h> #include <platform_support.h> #include "ia_css_circbuf_comm.h"
@@ -45,7 +44,7 @@ struct ia_css_circbuf_s {* @param elems An array of elements. * @param desc The descriptor set to the size using ia_css_circbuf_desc_init(). */ -STORAGE_CLASS_EXTERN void ia_css_circbuf_create( +extern void ia_css_circbuf_create (ia_css_circbuf_t *cb,ia_css_circbuf_elem_t *elems,ia_css_circbuf_desc_t *desc);
@@ -55,7 +54,7 @@ STORAGE_CLASS_EXTERN void ia_css_circbuf_create(* * @param cb The pointer to the circular buffer. */ -STORAGE_CLASS_EXTERN void ia_css_circbuf_destroy( +extern void ia_css_circbuf_destroy (ia_css_circbuf_t *cb);/**
@@ -68,7 +67,7 @@ STORAGE_CLASS_EXTERN void ia_css_circbuf_destroy(* * @return the pop-out value. */ -STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_pop( +extern uint32_t ia_css_circbuf_pop (ia_css_circbuf_t *cb);/**
@@ -82,7 +81,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_pop(* * @return the extracted value. */ -STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_extract( +extern uint32_t ia_css_circbuf_extract (ia_css_circbuf_t *cb,int offset);
@@ -97,7 +96,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_extract(* @param elem The pointer to the element. * @param val The value to be set. */ -STORAGE_CLASS_INLINE void ia_css_circbuf_elem_set_val( +static inline void ia_css_circbuf_elem_set_val (ia_css_circbuf_elem_t *elem,uint32_t val) {
@@ -111,7 +110,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_set_val(* * @param elem The pointer to the element. */ -STORAGE_CLASS_INLINE void ia_css_circbuf_elem_init( +static inline void ia_css_circbuf_elem_init (ia_css_circbuf_elem_t *elem) {OP___assert (elem !=NULL );
@@ -124,7 +123,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_init(* @param src The element as the copy source. * @param dest The element as the copy destination. */ -STORAGE_CLASS_INLINE void ia_css_circbuf_elem_cpy( +static inline void ia_css_circbuf_elem_cpy (ia_css_circbuf_elem_t *src,ia_css_circbuf_elem_t *dest) {
@@ -143,7 +142,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_cpy(* * @return the position at offset. */ -STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_get_pos_at_offset( +static inline uint8_t ia_css_circbuf_get_pos_at_offset (ia_css_circbuf_t *cb,uint32_t base,int offset)
@@ -176,7 +175,7 @@ STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_get_pos_at_offset(* * @return the offset. */ -STORAGE_CLASS_INLINE int ia_css_circbuf_get_offset( +static inline int ia_css_circbuf_get_offset (ia_css_circbuf_t *cb,uint32_t src_pos,uint32_t dest_pos)
@@ -201,7 +200,7 @@ STORAGE_CLASS_INLINE int ia_css_circbuf_get_offset(* * TODO: Test this API. */ -STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_size( +static inline uint32_t ia_css_circbuf_get_size (ia_css_circbuf_t *cb) {OP___assert (cb !=NULL );
@@ -217,7 +216,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_size(* * @return the number of available elements. */ -STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_num_elems( +static inline uint32_t ia_css_circbuf_get_num_elems (ia_css_circbuf_t *cb) {int num;
@@ -239,7 +238,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_num_elems(* - true when it is empty. * - false when it is not empty. */ -STORAGE_CLASS_INLINE bool ia_css_circbuf_is_empty( +static inline bool ia_css_circbuf_is_empty (ia_css_circbuf_t *cb) {OP___assert (cb !=NULL );
@@ -257,7 +256,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_is_empty(* - true when it is full. * - false when it is not full. */ -STORAGE_CLASS_INLINE bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb) +static inline bool ia_css_circbuf_is_full (ia_css_circbuf_t *cb) {OP___assert (cb !=NULL );OP___assert (cb->desc !=NULL );
@@ -274,7 +273,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)* @param cb The pointer to the circular buffer. * @param elem The new element. */ -STORAGE_CLASS_INLINE void ia_css_circbuf_write( +static inline void ia_css_circbuf_write (ia_css_circbuf_t *cb,ia_css_circbuf_elem_t elem) {
@@ -298,7 +297,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_write(* @param cb The pointer to the circular buffer. * @param val The value to be pushed in. */ -STORAGE_CLASS_INLINE void ia_css_circbuf_push( +static inline void ia_css_circbuf_push (ia_css_circbuf_t *cb,uint32_t val) {
@@ -321,7 +320,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_push(* * @return: The number of free elements. */ -STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_free_elems( +static inline uint32_t ia_css_circbuf_get_free_elems (ia_css_circbuf_t *cb) {OP___assert (cb !=NULL );
@@ -338,7 +337,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_free_elems(* * @return the elements value. */ -STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek( +extern uint32_t ia_css_circbuf_peek (ia_css_circbuf_t *cb,int offset);
@@ -350,7 +349,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek(* * @return the elements value. */ -STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek_from_start( +extern uint32_t ia_css_circbuf_peek_from_start (ia_css_circbuf_t *cb,int offset);
@@ -369,7 +368,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek_from_start(* @return true on succesfully increasing the size * false on failure */ -STORAGE_CLASS_EXTERN bool ia_css_circbuf_increase_size( +extern bool ia_css_circbuf_increase_size (ia_css_circbuf_t *cb,unsigned int sz_delta,ia_css_circbuf_elem_t *elems);
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf_desc.h +7 -8
@@ -17,7 +17,6 @@#include <type_support.h> #include <math_support.h> -#include <storage_class.h> #include <platform_support.h> #include <sp.h> #include "ia_css_circbuf_comm.h"
@@ -35,7 +34,7 @@* - true when it is empty. * - false when it is not empty. */ -STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_empty( +static inline bool ia_css_circbuf_desc_is_empty (ia_css_circbuf_desc_t *cb_desc) {OP___assert (cb_desc !=NULL );
@@ -52,7 +51,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_empty(* - true when it is full. * - false when it is not full. */ -STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_full( +static inline bool ia_css_circbuf_desc_is_full (ia_css_circbuf_desc_t *cb_desc) {OP___assert (cb_desc !=NULL );
@@ -65,7 +64,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_full(* @param cb_desc The pointer circular buffer descriptor * @param size The size of the circular buffer */ -STORAGE_CLASS_INLINE void ia_css_circbuf_desc_init( +static inline void ia_css_circbuf_desc_init (ia_css_circbuf_desc_t *cb_desc,int8_t size) {
@@ -82,7 +81,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_desc_init(* * @return the position in the circular buffer descriptor. */ -STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_desc_get_pos_at_offset( +static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset (ia_css_circbuf_desc_t *cb_desc,uint32_t base,int offset)
@@ -114,7 +113,7 @@ STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_desc_get_pos_at_offset(* * @return the offset. */ -STORAGE_CLASS_INLINE int ia_css_circbuf_desc_get_offset( +static inline int ia_css_circbuf_desc_get_offset (ia_css_circbuf_desc_t *cb_desc,uint32_t src_pos,uint32_t dest_pos)
@@ -135,7 +134,7 @@ STORAGE_CLASS_INLINE int ia_css_circbuf_desc_get_offset(* * @return The number of available elements. */ -STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_num_elems( +static inline uint32_t ia_css_circbuf_desc_get_num_elems (ia_css_circbuf_desc_t *cb_desc) {int num;
@@ -155,7 +154,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_num_elems(* * @return: The number of free elements. */ -STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_free_elems( +static inline uint32_t ia_css_circbuf_desc_get_free_elems (ia_css_circbuf_desc_t *cb_desc) {uint32_t num;
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h +9 -9
@@ -34,7 +34,7 @@* @brief Get the csi rx fe state. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_state( +static inline void csi_rx_fe_ctrl_get_state (const csi_rx_frontend_ID_t ID ,csi_rx_fe_ctrl_state_t *state) {
@@ -73,7 +73,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_state(* @brief Get the state of the csi rx fe dlane process. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_dlane_state( +static inline void csi_rx_fe_ctrl_get_dlane_state (const csi_rx_frontend_ID_t ID ,const uint32_t lane,csi_rx_fe_ctrl_lane_t *dlane_state)
@@ -89,7 +89,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_dlane_state(* @brief dump the csi rx fe state. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_dump_state( +static inline void csi_rx_fe_ctrl_dump_state (const csi_rx_frontend_ID_t ID ,csi_rx_fe_ctrl_state_t *state) {
@@ -118,7 +118,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_dump_state(* @brief Get the csi rx be state. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_get_state( +static inline void csi_rx_be_ctrl_get_state (const csi_rx_backend_ID_t ID ,csi_rx_be_ctrl_state_t *state) {
@@ -181,7 +181,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_get_state(* @brief Dump the csi rx be state. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_dump_state( +static inline void csi_rx_be_ctrl_dump_state (const csi_rx_backend_ID_t ID ,csi_rx_be_ctrl_state_t *state) {
@@ -225,7 +225,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_dump_state(* @brief Load the register value. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_fe_ctrl_reg_load( +static inline hrt_data csi_rx_fe_ctrl_reg_load (const csi_rx_frontend_ID_t ID ,const hrt_address reg) {
@@ -239,7 +239,7 @@ STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_fe_ctrl_reg_load(* @brief Store a value to the register. * Refer to "ibuf_ctrl_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_reg_store( +static inline void csi_rx_fe_ctrl_reg_store (const csi_rx_frontend_ID_t ID ,const hrt_address reg,const hrt_data value)
@@ -253,7 +253,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_reg_store(* @brief Load the register value. * Refer to "csi_rx_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_be_ctrl_reg_load( +static inline hrt_data csi_rx_be_ctrl_reg_load (const csi_rx_backend_ID_t ID ,const hrt_address reg) {
@@ -267,7 +267,7 @@ STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_be_ctrl_reg_load(* @brief Store a value to the register. * Refer to "ibuf_ctrl_public.h" for details. */ -STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_reg_store( +static inline void csi_rx_be_ctrl_reg_store (const csi_rx_backend_ID_t ID ,const hrt_address reg,const hrt_data value)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor.c +4 -4
@@ -38,12 +38,12 @@ STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {#include "fifo_monitor_private.h" #endif /* __INLINE_FIFO_MONITOR__ */ -STORAGE_CLASS_INLINE bool fifo_monitor_status_valid ( +static inline bool fifo_monitor_status_valid (const fifo_monitor_ID_t ID ,const unsigned int reg,const unsigned int port_id); -STORAGE_CLASS_INLINE bool fifo_monitor_status_accept( +static inline bool fifo_monitor_status_accept (const fifo_monitor_ID_t ID ,const unsigned int reg,const unsigned int port_id);
@@ -546,7 +546,7 @@ void fifo_monitor_get_state(return ; } -STORAGE_CLASS_INLINE bool fifo_monitor_status_valid ( +static inline bool fifo_monitor_status_valid (const fifo_monitor_ID_t ID ,const unsigned int reg,const unsigned int port_id)
@@ -556,7 +556,7 @@ STORAGE_CLASS_INLINE bool fifo_monitor_status_valid (return (data >> (((port_id *2 ) + _hive_str_mon_valid_offset))) &0x1 ; } -STORAGE_CLASS_INLINE bool fifo_monitor_status_accept( +static inline bool fifo_monitor_status_accept (const fifo_monitor_ID_t ID ,const unsigned int reg,const unsigned int port_id)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gdc.c +4 -4
@@ -22,12 +22,12 @@/* * Local function declarations */ -STORAGE_CLASS_INLINE void gdc_reg_store( +static inline void gdc_reg_store (const gdc_ID_t ID ,const unsigned int reg,const hrt_data value); -STORAGE_CLASS_INLINE hrt_data gdc_reg_load( +static inline hrt_data gdc_reg_load (const gdc_ID_t ID ,const unsigned int reg);
@@ -110,7 +110,7 @@ int gdc_get_unity(/* * Local function implementations */ -STORAGE_CLASS_INLINE void gdc_reg_store( +static inline void gdc_reg_store (const gdc_ID_t ID ,const unsigned int reg,const hrt_data value)
@@ -119,7 +119,7 @@ STORAGE_CLASS_INLINE void gdc_reg_store(return ; } -STORAGE_CLASS_INLINE hrt_data gdc_reg_load( +static inline hrt_data gdc_reg_load (const gdc_ID_t ID ,const unsigned int reg) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c +10 -10
@@ -81,27 +81,27 @@ static input_system_error_t input_system_multiplexer_cfg( -STORAGE_CLASS_INLINE void capture_unit_get_state( +static inline void capture_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,capture_unit_state_t *state); -STORAGE_CLASS_INLINE void acquisition_unit_get_state( +static inline void acquisition_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,acquisition_unit_state_t *state); -STORAGE_CLASS_INLINE void ctrl_unit_get_state( +static inline void ctrl_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,ctrl_unit_state_t *state); -STORAGE_CLASS_INLINE void mipi_port_get_state( +static inline void mipi_port_get_state (const rx_ID_t ID ,const mipi_port_ID_t port_ID,mipi_port_state_t *state); -STORAGE_CLASS_INLINE void rx_channel_get_state( +static inline void rx_channel_get_state (const rx_ID_t ID ,const unsigned int ch_id,rx_channel_state_t *state);
@@ -359,7 +359,7 @@ void receiver_irq_clear(return ; } -STORAGE_CLASS_INLINE void capture_unit_get_state( +static inline void capture_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,capture_unit_state_t *state)
@@ -421,7 +421,7 @@ STORAGE_CLASS_INLINE void capture_unit_get_state(return ; } -STORAGE_CLASS_INLINE void acquisition_unit_get_state( +static inline void acquisition_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,acquisition_unit_state_t *state)
@@ -471,7 +471,7 @@ STORAGE_CLASS_INLINE void acquisition_unit_get_state(return ; } -STORAGE_CLASS_INLINE void ctrl_unit_get_state( +static inline void ctrl_unit_get_state (const input_system_ID_t ID ,const sub_system_ID_t sub_id,ctrl_unit_state_t *state)
@@ -554,7 +554,7 @@ STORAGE_CLASS_INLINE void ctrl_unit_get_state(return ; } -STORAGE_CLASS_INLINE void mipi_port_get_state( +static inline void mipi_port_get_state (const rx_ID_t ID ,const mipi_port_ID_t port_ID,mipi_port_state_t *state)
@@ -590,7 +590,7 @@ STORAGE_CLASS_INLINE void mipi_port_get_state(return ; } -STORAGE_CLASS_INLINE void rx_channel_get_state( +static inline void rx_channel_get_state (const rx_ID_t ID ,const unsigned int ch_id,rx_channel_state_t *state)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq.c +6 -6
@@ -22,13 +22,13 @@#include "platform_support.h" /* hrt_sleep() */ -STORAGE_CLASS_INLINE void irq_wait_for_write_complete( +static inline void irq_wait_for_write_complete (const irq_ID_t ID ); -STORAGE_CLASS_INLINE bool any_irq_channel_enabled( +static inline bool any_irq_channel_enabled (const irq_ID_t ID ); -STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id( +static inline irq_ID_t virq_get_irq_id (const virq_id_t irq_ID,unsigned int *channel_ID);
@@ -406,7 +406,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(return status; } -STORAGE_CLASS_INLINE void irq_wait_for_write_complete( +static inline void irq_wait_for_write_complete (const irq_ID_t ID ) {assert (ID <N_IRQ_ID );
@@ -415,7 +415,7 @@ STORAGE_CLASS_INLINE void irq_wait_for_write_complete( _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX*sizeof(hrt_data)); } -STORAGE_CLASS_INLINE bool any_irq_channel_enabled( +static inline bool any_irq_channel_enabled (const irq_ID_t ID ) {hrt_data en_reg;
@@ -428,7 +428,7 @@ STORAGE_CLASS_INLINE bool any_irq_channel_enabled(return (en_reg !=0 ); } -STORAGE_CLASS_INLINE irq_ID_t virq_get_irq_id( +static inline irq_ID_t virq_get_irq_id (const virq_id_t irq_ID,unsigned int *channel_ID) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/assert_support.h +1 -2
@@ -15,7 +15,6 @@#ifndef __ASSERT_SUPPORT_H_INCLUDED__#define __ASSERT_SUPPORT_H_INCLUDED__ -#include "storage_class.h" /** * The following macro can help to test the size of a struct at compile
@@ -92,7 +91,7 @@* The implemenation for the pipe generation tool is in see support.isp.h */ #define OP___assert (cnd) assert(cnd) -STORAGE_CLASS_INLINE void compile_time_assert (unsigned cond) +static inline void compile_time_assert (unsigned cond) {/* Call undefined function if cond is false */ extern void _compile_time_assert (void );
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/bamem.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "bamem_local.h" #ifndef __INLINE_BAMEM__ -#define STORAGE_CLASS_BAMEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_BAMEM_H extern#define STORAGE_CLASS_BAMEM_C #include "bamem_public.h" #else /* __INLINE_BAMEM__ */ -#define STORAGE_CLASS_BAMEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_BAMEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_BAMEM_H static inline +#define STORAGE_CLASS_BAMEM_C static inline#include "bamem_private.h" #endif /* __INLINE_BAMEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/csi_rx.h +0 -5
@@ -30,18 +30,13 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "csi_rx_local.h" #ifndef __INLINE_CSI_RX__ -#define STORAGE_CLASS_CSI_RX_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_CSI_RX_C #include "csi_rx_public.h" #else /* __INLINE_CSI_RX__ */ -#define STORAGE_CLASS_CSI_RX_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_CSI_RX_C STORAGE_CLASS_INLINE#include "csi_rx_private.h" #endif /* __INLINE_CSI_RX__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/debug.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "debug_local.h" #ifndef __INLINE_DEBUG__ -#define STORAGE_CLASS_DEBUG_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_DEBUG_H extern#define STORAGE_CLASS_DEBUG_C #include "debug_public.h"#else /* __INLINE_DEBUG__ */ -#define STORAGE_CLASS_DEBUG_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_DEBUG_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_DEBUG_H static inline +#define STORAGE_CLASS_DEBUG_C static inline#include "debug_private.h" #endif /* __INLINE_DEBUG__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/dma.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "dma_local.h" #ifndef __INLINE_DMA__ -#define STORAGE_CLASS_DMA_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_DMA_H extern#define STORAGE_CLASS_DMA_C #include "dma_public.h"#else /* __INLINE_DMA__ */ -#define STORAGE_CLASS_DMA_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_DMA_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_DMA_H static inline +#define STORAGE_CLASS_DMA_C static inline#include "dma_private.h" #endif /* __INLINE_DMA__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/event_fifo.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "event_fifo_local.h" #ifndef __INLINE_EVENT__ -#define STORAGE_CLASS_EVENT_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_EVENT_H extern#define STORAGE_CLASS_EVENT_C #include "event_fifo_public.h"#else /* __INLINE_EVENT__ */ -#define STORAGE_CLASS_EVENT_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_EVENT_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_EVENT_H static inline +#define STORAGE_CLASS_EVENT_C static inline#include "event_fifo_private.h" #endif /* __INLINE_EVENT__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/fifo_monitor.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "fifo_monitor_local.h" #ifndef __INLINE_FIFO_MONITOR__ -#define STORAGE_CLASS_FIFO_MONITOR_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_FIFO_MONITOR_H extern#define STORAGE_CLASS_FIFO_MONITOR_C #include "fifo_monitor_public.h"#else /* __INLINE_FIFO_MONITOR__ */ -#define STORAGE_CLASS_FIFO_MONITOR_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_FIFO_MONITOR_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_FIFO_MONITOR_H static inline +#define STORAGE_CLASS_FIFO_MONITOR_C static inline#include "fifo_monitor_private.h" #endif /* __INLINE_FIFO_MONITOR__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gdc_device.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "gdc_local.h" #ifndef __INLINE_GDC__ -#define STORAGE_CLASS_GDC_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_GDC_H extern#define STORAGE_CLASS_GDC_C #include "gdc_public.h"#else /* __INLINE_GDC__ */ -#define STORAGE_CLASS_GDC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_GDC_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_GDC_H static inline +#define STORAGE_CLASS_GDC_C static inline#include "gdc_private.h" #endif /* __INLINE_GDC__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gp_device.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "gp_device_local.h" #ifndef __INLINE_GP_DEVICE__ -#define STORAGE_CLASS_GP_DEVICE_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_GP_DEVICE_H extern#define STORAGE_CLASS_GP_DEVICE_C #include "gp_device_public.h"#else /* __INLINE_GP_DEVICE__ */ -#define STORAGE_CLASS_GP_DEVICE_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_GP_DEVICE_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_GP_DEVICE_H static inline +#define STORAGE_CLASS_GP_DEVICE_C static inline#include "gp_device_private.h" #endif /* __INLINE_GP_DEVICE__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gp_timer.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" /*GP_TIMER_BASE address */ #include "gp_timer_local.h" /*GP_TIMER register offsets */ #ifndef __INLINE_GP_TIMER__ -#define STORAGE_CLASS_GP_TIMER_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_GP_TIMER_H extern#define STORAGE_CLASS_GP_TIMER_C #include "gp_timer_public.h" /* functions*/ #else /* __INLINE_GP_TIMER__ */ -#define STORAGE_CLASS_GP_TIMER_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_GP_TIMER_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_GP_TIMER_H static inline +#define STORAGE_CLASS_GP_TIMER_C static inline#include "gp_timer_private.h" /* inline functions*/ #endif /* __INLINE_GP_TIMER__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gpio.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "gpio_local.h" #ifndef __INLINE_GPIO__ -#define STORAGE_CLASS_GPIO_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_GPIO_H extern#define STORAGE_CLASS_GPIO_C #include "gpio_public.h"#else /* __INLINE_GPIO__ */ -#define STORAGE_CLASS_GPIO_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_GPIO_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_GPIO_H static inline +#define STORAGE_CLASS_GPIO_C static inline#include "gpio_private.h" #endif /* __INLINE_GPIO__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/hmem.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "hmem_local.h" #ifndef __INLINE_HMEM__ -#define STORAGE_CLASS_HMEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_HMEM_H extern#define STORAGE_CLASS_HMEM_C #include "hmem_public.h"#else /* __INLINE_HMEM__ */ -#define STORAGE_CLASS_HMEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_HMEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_HMEM_H static inline +#define STORAGE_CLASS_HMEM_C static inline#include "hmem_private.h" #endif /* __INLINE_HMEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h +9 -9
@@ -28,7 +28,7 @@* @param[in] id The global unique ID of the csi rx fe controller. * @param[out] state Point to the register-state. */ -STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_get_state( +extern void csi_rx_fe_ctrl_get_state (const csi_rx_frontend_ID_t ID ,csi_rx_fe_ctrl_state_t *state);/**
@@ -38,7 +38,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_get_state(* @param[in] id The global unique ID of the csi rx fe controller. * @param[in] state Point to the register-state. */ -STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_dump_state( +extern void csi_rx_fe_ctrl_dump_state (const csi_rx_frontend_ID_t ID ,csi_rx_fe_ctrl_state_t *state);/**
@@ -49,7 +49,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_dump_state(* @param[in] lane The lane ID. * @param[out] state Point to the dlane state. */ -STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_get_dlane_state( +extern void csi_rx_fe_ctrl_get_dlane_state (const csi_rx_frontend_ID_t ID ,const uint32_t lane,csi_rx_fe_ctrl_lane_t *dlane_state);
@@ -60,7 +60,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_get_dlane_state(* @param[in] id The global unique ID of the csi rx be controller. * @param[out] state Point to the register-state. */ -STORAGE_CLASS_CSI_RX_H void csi_rx_be_ctrl_get_state( +extern void csi_rx_be_ctrl_get_state (const csi_rx_backend_ID_t ID ,csi_rx_be_ctrl_state_t *state);/**
@@ -70,7 +70,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_be_ctrl_get_state(* @param[in] id The global unique ID of the csi rx be controller. * @param[in] state Point to the register-state. */ -STORAGE_CLASS_CSI_RX_H void csi_rx_be_ctrl_dump_state( +extern void csi_rx_be_ctrl_dump_state (const csi_rx_backend_ID_t ID ,csi_rx_be_ctrl_state_t *state);/** end of NCI */
@@ -89,7 +89,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_be_ctrl_dump_state(* * @return the value of the register. */ -STORAGE_CLASS_CSI_RX_H hrt_data csi_rx_fe_ctrl_reg_load( +extern hrt_data csi_rx_fe_ctrl_reg_load (const csi_rx_frontend_ID_t ID ,const hrt_address reg);/**
@@ -101,7 +101,7 @@ STORAGE_CLASS_CSI_RX_H hrt_data csi_rx_fe_ctrl_reg_load(* @param[in] value The value to be stored. * */ -STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_reg_store( +extern void csi_rx_fe_ctrl_reg_store (const csi_rx_frontend_ID_t ID ,const hrt_address reg,const hrt_data value);
@@ -114,7 +114,7 @@ STORAGE_CLASS_CSI_RX_H void csi_rx_fe_ctrl_reg_store(* * @return the value of the register. */ -STORAGE_CLASS_CSI_RX_H hrt_data csi_rx_be_ctrl_reg_load( +extern hrt_data csi_rx_be_ctrl_reg_load (const csi_rx_backend_ID_t ID ,const hrt_address reg);/**
@@ -126,7 +126,7 @@ STORAGE_CLASS_CSI_RX_H hrt_data csi_rx_be_ctrl_reg_load(* @param[in] value The value to be stored. * */ -STORAGE_CLASS_CSI_RX_H void csi_rx_be_ctrl_reg_store( +extern void csi_rx_be_ctrl_reg_store (const csi_rx_backend_ID_t ID ,const hrt_address reg,const hrt_data value);
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/gdc_public.h +3 -3
@@ -33,7 +33,7 @@\return none, GDC[ID].lut[0...3][0...HRT_GDC_N-1] = data */ -STORAGE_CLASS_EXTERN void gdc_lut_store( +extern void gdc_lut_store (const gdc_ID_t ID ,const int data[4 ][HRT_GDC_N ]);
@@ -43,7 +43,7 @@ STORAGE_CLASS_EXTERN void gdc_lut_store(\param in_lut[in] The data matrix to be converted \param out_lut[out] The data matrix as the output of conversion */ -STORAGE_CLASS_EXTERN void gdc_lut_convert_to_isp_format( +extern void gdc_lut_convert_to_isp_format (const int in_lut[4 ][HRT_GDC_N ],int out_lut[4 ][HRT_GDC_N ]);
@@ -53,7 +53,7 @@ STORAGE_CLASS_EXTERN void gdc_lut_convert_to_isp_format(\return unity */ -STORAGE_CLASS_EXTERN int gdc_get_unity( +extern int gdc_get_unity (const gdc_ID_t ID );#endif /* __GDC_PUBLIC_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h +4 -5
@@ -27,14 +27,13 @@* Prerequisites: * */ -#include "storage_class.h" #ifdef INLINE_ISP_OP1W -#define STORAGE_CLASS_ISP_OP1W_FUNC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_ISP_OP1W_DATA_H STORAGE_CLASS_INLINE_DATA +#define STORAGE_CLASS_ISP_OP1W_FUNC_H static inline +#define STORAGE_CLASS_ISP_OP1W_DATA_H static inline_DATA#else /* INLINE_ISP_OP1W */ -#define STORAGE_CLASS_ISP_OP1W_FUNC_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_ISP_OP1W_DATA_H STORAGE_CLASS_EXTERN_DATA +#define STORAGE_CLASS_ISP_OP1W_FUNC_H extern +#define STORAGE_CLASS_ISP_OP1W_DATA_H extern_DATA#endif /* INLINE_ISP_OP1W */ /*
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h +4 -5
@@ -27,14 +27,13 @@* Prerequisites: * */ -#include "storage_class.h" #ifdef INLINE_ISP_OP2W -#define STORAGE_CLASS_ISP_OP2W_FUNC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_ISP_OP2W_DATA_H STORAGE_CLASS_INLINE_DATA +#define STORAGE_CLASS_ISP_OP2W_FUNC_H static inline +#define STORAGE_CLASS_ISP_OP2W_DATA_H static inline_DATA#else /* INLINE_ISP_OP2W */ -#define STORAGE_CLASS_ISP_OP2W_FUNC_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_ISP_OP2W_DATA_H STORAGE_CLASS_EXTERN_DATA +#define STORAGE_CLASS_ISP_OP2W_FUNC_H extern +#define STORAGE_CLASS_ISP_OP2W_DATA_H extern_DATA#endif /* INLINE_ISP_OP2W */ /*
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/mmu_public.h +4 -4
@@ -24,7 +24,7 @@\return none, MMU[ID].page_table_base_index = base_index */ -STORAGE_CLASS_EXTERN void mmu_set_page_table_base_index( +extern void mmu_set_page_table_base_index (const mmu_ID_t ID ,const hrt_data base_index);
@@ -35,7 +35,7 @@ STORAGE_CLASS_EXTERN void mmu_set_page_table_base_index(\return MMU[ID].page_table_base_index */ -STORAGE_CLASS_EXTERN hrt_data mmu_get_page_table_base_index( +extern hrt_data mmu_get_page_table_base_index (const mmu_ID_t ID );/*! Invalidate the page table cache of MMU[ID]
@@ -44,7 +44,7 @@ STORAGE_CLASS_EXTERN hrt_data mmu_get_page_table_base_index(\return none */ -STORAGE_CLASS_EXTERN void mmu_invalidate_cache( +extern void mmu_invalidate_cache (const mmu_ID_t ID );
@@ -52,7 +52,7 @@ STORAGE_CLASS_EXTERN void mmu_invalidate_cache(\return none */ -STORAGE_CLASS_EXTERN void mmu_invalidate_cache_all(void); +extern void mmu_invalidate_cache_all (void );/*! Write to a control register of MMU[ID]
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h +4 -5
@@ -15,14 +15,13 @@#ifndef _REF_VECTOR_FUNC_H_INCLUDED_#define _REF_VECTOR_FUNC_H_INCLUDED_ -#include "storage_class.h" #ifdef INLINE_VECTOR_FUNC -#define STORAGE_CLASS_REF_VECTOR_FUNC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_REF_VECTOR_DATA_H STORAGE_CLASS_INLINE_DATA +#define STORAGE_CLASS_REF_VECTOR_FUNC_H static inline +#define STORAGE_CLASS_REF_VECTOR_DATA_H static inline_DATA#else /* INLINE_VECTOR_FUNC */ -#define STORAGE_CLASS_REF_VECTOR_FUNC_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_REF_VECTOR_DATA_H STORAGE_CLASS_EXTERN_DATA +#define STORAGE_CLASS_REF_VECTOR_FUNC_H extern +#define STORAGE_CLASS_REF_VECTOR_DATA_H extern_DATA#endif /* INLINE_VECTOR_FUNC */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/ibuf_ctrl.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "ibuf_ctrl_local.h" #ifndef __INLINE_IBUF_CTRL__ -#define STORAGE_CLASS_IBUF_CTRL_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_IBUF_CTRL_H extern#define STORAGE_CLASS_IBUF_CTRL_C #include "ibuf_ctrl_public.h" #else /* __INLINE_IBUF_CTRL__ */ -#define STORAGE_CLASS_IBUF_CTRL_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_IBUF_CTRL_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_IBUF_CTRL_H static inline +#define STORAGE_CLASS_IBUF_CTRL_C static inline#include "ibuf_ctrl_private.h" #endif /* __INLINE_IBUF_CTRL__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/input_formatter.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "input_formatter_local.h" #ifndef __INLINE_INPUT_FORMATTER__ -#define STORAGE_CLASS_INPUT_FORMATTER_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_INPUT_FORMATTER_H extern#define STORAGE_CLASS_INPUT_FORMATTER_C #include "input_formatter_public.h"#else /* __INLINE_INPUT_FORMATTER__ */ -#define STORAGE_CLASS_INPUT_FORMATTER_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_INPUT_FORMATTER_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_INPUT_FORMATTER_H static inline +#define STORAGE_CLASS_INPUT_FORMATTER_C static inline#include "input_formatter_private.h" #endif /* __INLINE_INPUT_FORMATTER__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/input_system.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "input_system_local.h" #ifndef __INLINE_INPUT_SYSTEM__ -#define STORAGE_CLASS_INPUT_SYSTEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_INPUT_SYSTEM_H extern#define STORAGE_CLASS_INPUT_SYSTEM_C #include "input_system_public.h"#else /* __INLINE_INPUT_SYSTEM__ */ -#define STORAGE_CLASS_INPUT_SYSTEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_INPUT_SYSTEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_INPUT_SYSTEM_H static inline +#define STORAGE_CLASS_INPUT_SYSTEM_C static inline#include "input_system_private.h" #endif /* __INLINE_INPUT_SYSTEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/irq.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "irq_local.h" #ifndef __INLINE_IRQ__ -#define STORAGE_CLASS_IRQ_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_IRQ_H extern#define STORAGE_CLASS_IRQ_C #include "irq_public.h"#else /* __INLINE_IRQ__ */ -#define STORAGE_CLASS_IRQ_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_IRQ_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_IRQ_H static inline +#define STORAGE_CLASS_IRQ_C static inline#include "irq_private.h" #endif /* __INLINE_IRQ__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isp.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "isp_local.h" #ifndef __INLINE_ISP__ -#define STORAGE_CLASS_ISP_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_ISP_H extern#define STORAGE_CLASS_ISP_C #include "isp_public.h"#else /* __INLINE_iSP__ */ -#define STORAGE_CLASS_ISP_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_ISP_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_ISP_H static inline +#define STORAGE_CLASS_ISP_C static inline#include "isp_private.h" #endif /* __INLINE_ISP__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isys_dma.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "isys_dma_local.h" #ifndef __INLINE_ISYS2401_DMA__ -#define STORAGE_CLASS_ISYS2401_DMA_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_ISYS2401_DMA_H extern#define STORAGE_CLASS_ISYS2401_DMA_C #include "isys_dma_public.h" #else /* __INLINE_ISYS2401_DMA__ */ -#define STORAGE_CLASS_ISYS2401_DMA_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_ISYS2401_DMA_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_ISYS2401_DMA_H static inline +#define STORAGE_CLASS_ISYS2401_DMA_C static inline#include "isys_dma_private.h" #endif /* __INLINE_ISYS2401_DMA__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isys_irq.h +4 -5
@@ -16,21 +16,20 @@#define __IA_CSS_ISYS_IRQ_H__#include <type_support.h> -#include <storage_class.h> #include <system_local.h> #if defined(USE_INPUT_SYSTEM_VERSION_2401 )#ifndef __INLINE_ISYS2401_IRQ__ -#define STORAGE_CLASS_ISYS2401_IRQ_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_ISYS2401_IRQ_C STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_ISYS2401_IRQ_H extern +#define STORAGE_CLASS_ISYS2401_IRQ_C extern#include "isys_irq_public.h" #else /* __INLINE_ISYS2401_IRQ__ */ -#define STORAGE_CLASS_ISYS2401_IRQ_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_ISYS2401_IRQ_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_ISYS2401_IRQ_H static inline +#define STORAGE_CLASS_ISYS2401_IRQ_C static inline#include "isys_irq_private.h" #endif /* __INLINE_ISYS2401_IRQ__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isys_stream2mmio.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "isys_stream2mmio_local.h" #ifndef __INLINE_STREAM2MMIO__ -#define STORAGE_CLASS_STREAM2MMIO_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_STREAM2MMIO_H extern#define STORAGE_CLASS_STREAM2MMIO_C #include "isys_stream2mmio_public.h" #else /* __INLINE_STREAM2MMIO__ */ -#define STORAGE_CLASS_STREAM2MMIO_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_STREAM2MMIO_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_STREAM2MMIO_H static inline +#define STORAGE_CLASS_STREAM2MMIO_C static inline#include "isys_stream2mmio_private.h" #endif /* __INLINE_STREAM2MMIO__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h +12 -13
@@ -15,7 +15,6 @@#ifndef __MATH_SUPPORT_H#define __MATH_SUPPORT_H -#include "storage_class.h" /* for STORAGE_CLASS_INLINE */ #if defined(__KERNEL__)#include <linux/kernel.h> /* Override the definition of max/min from linux kernel*/ #endif /*__KERNEL__*/
@@ -110,60 +109,60 @@ Leaving out the other math utility functions as they are newly added#else /* !defined(INLINE_MATH_SUPPORT_UTILS) */ -STORAGE_CLASS_INLINE int max(int a, int b) +static inline int max (int a,int b) {return MAX (a, b); } -STORAGE_CLASS_INLINE int min(int a, int b) +static inline int min (int a,int b) {return MIN (a, b); } -STORAGE_CLASS_INLINE unsigned int ceil_div(unsigned int a, unsigned int b) +static inline unsigned int ceil_div (unsigned int a,unsigned int b) {return CEIL_DIV (a, b); }#endif /* !defined(INLINE_MATH_SUPPORT_UTILS) */ -STORAGE_CLASS_INLINE unsigned int umax(unsigned int a, unsigned int b) +static inline unsigned int umax (unsigned int a,unsigned int b) {return MAX (a, b); } -STORAGE_CLASS_INLINE unsigned int umin(unsigned int a, unsigned int b) +static inline unsigned int umin (unsigned int a,unsigned int b) {return MIN (a, b); } -STORAGE_CLASS_INLINE unsigned int ceil_mul(unsigned int a, unsigned int b) +static inline unsigned int ceil_mul (unsigned int a,unsigned int b) {return CEIL_MUL (a, b); } -STORAGE_CLASS_INLINE unsigned int ceil_mul2(unsigned int a, unsigned int b) +static inline unsigned int ceil_mul2 (unsigned int a,unsigned int b) {return CEIL_MUL2 (a, b); } -STORAGE_CLASS_INLINE unsigned int ceil_shift(unsigned int a, unsigned int b) +static inline unsigned int ceil_shift (unsigned int a,unsigned int b) {return CEIL_SHIFT (a, b); } -STORAGE_CLASS_INLINE unsigned int ceil_shift_mul(unsigned int a, unsigned int b) +static inline unsigned int ceil_shift_mul (unsigned int a,unsigned int b) {return CEIL_SHIFT_MUL (a, b); }#ifdef ISP2401 -STORAGE_CLASS_INLINE unsigned int round_half_down_div(unsigned int a, unsigned int b) +static inline unsigned int round_half_down_div (unsigned int a,unsigned int b) {return ROUND_HALF_DOWN_DIV (a, b); } -STORAGE_CLASS_INLINE unsigned int round_half_down_mul(unsigned int a, unsigned int b) +static inline unsigned int round_half_down_mul (unsigned int a,unsigned int b) {return ROUND_HALF_DOWN_MUL (a, b); }
@@ -187,7 +186,7 @@ STORAGE_CLASS_INLINE unsigned int round_half_down_mul(unsigned int a, unsigned i* */ -STORAGE_CLASS_INLINE unsigned int ceil_pow2(unsigned int a) +static inline unsigned int ceil_pow2 (unsigned int a) {if (a ==0 ) {return 1 ;
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/mmu_device.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "mmu_local.h" #ifndef __INLINE_MMU__ -#define STORAGE_CLASS_MMU_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_MMU_H extern#define STORAGE_CLASS_MMU_C #include "mmu_public.h"#else /* __INLINE_MMU__ */ -#define STORAGE_CLASS_MMU_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_MMU_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_MMU_H static inline +#define STORAGE_CLASS_MMU_C static inline#include "mmu_private.h" #endif /* __INLINE_MMU__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/mpmath.h +4 -5
@@ -15,14 +15,13 @@#ifndef __MPMATH_H_INCLUDED__#define __MPMATH_H_INCLUDED__ -#include "storage_class.h" #ifdef INLINE_MPMATH -#define STORAGE_CLASS_MPMATH_FUNC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_MPMATH_DATA_H STORAGE_CLASS_INLINE_DATA +#define STORAGE_CLASS_MPMATH_FUNC_H static inline +#define STORAGE_CLASS_MPMATH_DATA_H static inline_DATA#else /* INLINE_MPMATH */ -#define STORAGE_CLASS_MPMATH_FUNC_H STORAGE_CLASS_EXTERN -#define STORAGE_CLASS_MPMATH_DATA_H STORAGE_CLASS_EXTERN_DATA +#define STORAGE_CLASS_MPMATH_FUNC_H extern +#define STORAGE_CLASS_MPMATH_DATA_H extern_DATA#endif /* INLINE_MPMATH */ #include <type_support.h>
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/osys.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "osys_local.h" #ifndef __INLINE_OSYS__ -#define STORAGE_CLASS_OSYS_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_OSYS_H extern#define STORAGE_CLASS_OSYS_C #include "osys_public.h" #else /* __INLINE_OSYS__ */ -#define STORAGE_CLASS_OSYS_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_OSYS_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_OSYS_H static inline +#define STORAGE_CLASS_OSYS_C static inline#include "osys_private.h" #endif /* __INLINE_OSYS__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/pixelgen.h +3 -4
@@ -31,18 +31,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "pixelgen_local.h" #ifndef __INLINE_PIXELGEN__ -#define STORAGE_CLASS_PIXELGEN_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_PIXELGEN_H extern#define STORAGE_CLASS_PIXELGEN_C #include "pixelgen_public.h" #else /* __INLINE_PIXELGEN__ */ -#define STORAGE_CLASS_PIXELGEN_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_PIXELGEN_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_PIXELGEN_H static inline +#define STORAGE_CLASS_PIXELGEN_C static inline#include "pixelgen_private.h" #endif /* __INLINE_PIXELGEN__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/platform_support.h +0 -1
@@ -20,7 +20,6 @@* Platform specific includes and functionality. */ -#include "storage_class.h" #include <linux/delay.h> #include <linux/kernel.h> #include <linux/string.h>
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h +1 -2
@@ -15,7 +15,6 @@#ifndef __PRINT_SUPPORT_H_INCLUDED__#define __PRINT_SUPPORT_H_INCLUDED__ -#include "storage_class.h" #include <stdarg.h> #if !defined(__KERNEL__)
@@ -24,7 +23,7 @@extern int (*sh_css_printf) (const char *fmt,va_list args);/* depends on host supplied print function in ia_css_init() */ -STORAGE_CLASS_INLINE void ia_css_print(const char *fmt, ...) +static inline void ia_css_print (const char *fmt, ...) {va_list ap;if (sh_css_printf) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/queue.h +3 -4
@@ -29,18 +29,17 @@* */ -#include <storage_class.h> #include "queue_local.h" #ifndef __INLINE_QUEUE__ -#define STORAGE_CLASS_QUEUE_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_QUEUE_H extern#define STORAGE_CLASS_QUEUE_C /* #include "queue_public.h" */ #include "ia_css_queue.h" #else /* __INLINE_QUEUE__ */ -#define STORAGE_CLASS_QUEUE_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_QUEUE_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_QUEUE_H static inline +#define STORAGE_CLASS_QUEUE_C static inline#include "queue_private.h" #endif /* __INLINE_QUEUE__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/resource.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "resource_local.h" #ifndef __INLINE_RESOURCE__ -#define STORAGE_CLASS_RESOURCE_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_RESOURCE_H extern#define STORAGE_CLASS_RESOURCE_C #include "resource_public.h"#else /* __INLINE_RESOURCE__ */ -#define STORAGE_CLASS_RESOURCE_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_RESOURCE_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_RESOURCE_H static inline +#define STORAGE_CLASS_RESOURCE_C static inline#include "resource_private.h" #endif /* __INLINE_RESOURCE__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/socket.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "socket_local.h" #ifndef __INLINE_SOCKET__ -#define STORAGE_CLASS_SOCKET_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_SOCKET_H extern#define STORAGE_CLASS_SOCKET_C #include "socket_public.h" #else /* __INLINE_SOCKET__ */ -#define STORAGE_CLASS_SOCKET_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_SOCKET_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_SOCKET_H static inline +#define STORAGE_CLASS_SOCKET_C static inline#include "socket_private.h" #endif /* __INLINE_SOCKET__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/sp.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "sp_local.h" #ifndef __INLINE_SP__ -#define STORAGE_CLASS_SP_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_SP_H extern#define STORAGE_CLASS_SP_C #include "sp_public.h"#else /* __INLINE_SP__ */ -#define STORAGE_CLASS_SP_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_SP_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_SP_H static inline +#define STORAGE_CLASS_SP_C static inline#include "sp_private.h" #endif /* __INLINE_SP__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/storage_class.h deleted +0 -34
@@ -1,34 +0,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 __STORAGE_CLASS_H_INCLUDED__ -#define __STORAGE_CLASS_H_INCLUDED__ - -/** -* @file -* Platform specific includes and functionality. -*/ - -#define STORAGE_CLASS_EXTERN extern - -#if defined(_MSC_VER) -#define STORAGE_CLASS_INLINE static __inline -#else -#define STORAGE_CLASS_INLINE static inline -#endif - -#define STORAGE_CLASS_EXTERN_DATA extern const -#define STORAGE_CLASS_INLINE_DATA static const - -#endif /* __STORAGE_CLASS_H_INCLUDED__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/stream_buffer.h +3 -4
@@ -30,18 +30,17 @@* */ -#include "storage_class.h" #include "system_local.h" #include "stream_buffer_local.h" #ifndef __INLINE_STREAM_BUFFER__ -#define STORAGE_CLASS_STREAM_BUFFER_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_STREAM_BUFFER_H extern#define STORAGE_CLASS_STREAM_BUFFER_C #include "stream_buffer_public.h" #else /* __INLINE_STREAM_BUFFER__ */ -#define STORAGE_CLASS_STREAM_BUFFER_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_STREAM_BUFFER_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_STREAM_BUFFER_H static inline +#define STORAGE_CLASS_STREAM_BUFFER_C static inline#include "stream_buffer_private.h" #endif /* __INLINE_STREAM_BUFFER__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h +3 -4
@@ -16,7 +16,6 @@#define __STRING_SUPPORT_H_INCLUDED__#include <platform_support.h> #include <type_support.h> -#include <storage_class.h> #if !defined(_MSC_VER)/*
@@ -34,7 +33,7 @@* @return EINVAL on Invalid arguments * @return ERANGE on Destination size too small */ -STORAGE_CLASS_INLINE int memcpy_s( +static inline int memcpy_s( void* dest_buf, size_t dest_size, const void* src_buf,
@@ -89,7 +88,7 @@ static size_t strnlen_s(* @return Returns EINVAL on invalid arguments * @return Returns ERANGE on destination size too small */ -STORAGE_CLASS_INLINE int strncpy_s( +static inline int strncpy_s( char* dest_str, size_t dest_size, const char* src_str,
@@ -130,7 +129,7 @@ STORAGE_CLASS_INLINE int strncpy_s(* @return Returns EINVAL on invalid arguments * @return Returns ERANGE on destination size too small */ -STORAGE_CLASS_INLINE int strcpy_s( +static inline int strcpy_s (char * dest_str,size_t dest_size,const char * src_str)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/tag.h +3 -4
@@ -29,17 +29,16 @@* */ -#include "storage_class.h" #include "tag_local.h" #ifndef __INLINE_TAG__ -#define STORAGE_CLASS_TAG_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_TAG_H extern#define STORAGE_CLASS_TAG_C #include "tag_public.h"#else /* __INLINE_TAG__ */ -#define STORAGE_CLASS_TAG_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_TAG_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_TAG_H static inline +#define STORAGE_CLASS_TAG_C static inline#include "tag_private.h" #endif /* __INLINE_TAG__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/timed_ctrl.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "timed_ctrl_local.h" #ifndef __INLINE_TIMED_CTRL__ -#define STORAGE_CLASS_TIMED_CTRL_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_TIMED_CTRL_H extern#define STORAGE_CLASS_TIMED_CTRL_C #include "timed_ctrl_public.h"#else /* __INLINE_TIMED_CTRL__ */ -#define STORAGE_CLASS_TIMED_CTRL_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_TIMED_CTRL_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_TIMED_CTRL_H static inline +#define STORAGE_CLASS_TIMED_CTRL_C static inline#include "timed_ctrl_private.h" #endif /* __INLINE_TIMED_CTRL__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "vamem_local.h" #ifndef __INLINE_VAMEM__ -#define STORAGE_CLASS_VAMEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_VAMEM_H extern#define STORAGE_CLASS_VAMEM_C #include "vamem_public.h"#else /* __INLINE_VAMEM__ */ -#define STORAGE_CLASS_VAMEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_VAMEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_VAMEM_H static inline +#define STORAGE_CLASS_VAMEM_C static inline#include "vamem_private.h" #endif /* __INLINE_VAMEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vector_func.h +3 -4
@@ -15,7 +15,6 @@#ifndef __VECTOR_FUNC_H_INCLUDED__#define __VECTOR_FUNC_H_INCLUDED__ -#include "storage_class.h" /* TODO: Later filters will be moved to types directory, * and we should only include matrix_MxN types */
@@ -27,12 +26,12 @@#include "vector_func_local.h" #ifndef __INLINE_VECTOR_FUNC__ -#define STORAGE_CLASS_VECTOR_FUNC_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_VECTOR_FUNC_H extern#define STORAGE_CLASS_VECTOR_FUNC_C #include "vector_func_public.h"#else /* __INLINE_VECTOR_FUNC__ */ -#define STORAGE_CLASS_VECTOR_FUNC_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_VECTOR_FUNC_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_VECTOR_FUNC_H static inline +#define STORAGE_CLASS_VECTOR_FUNC_C static inline#include "vector_func_private.h" #endif /* __INLINE_VECTOR_FUNC__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vector_ops.h +3 -4
@@ -15,17 +15,16 @@#ifndef __VECTOR_OPS_H_INCLUDED__#define __VECTOR_OPS_H_INCLUDED__ -#include "storage_class.h" #include "vector_ops_local.h" #ifndef __INLINE_VECTOR_OPS__ -#define STORAGE_CLASS_VECTOR_OPS_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_VECTOR_OPS_H extern#define STORAGE_CLASS_VECTOR_OPS_C #include "vector_ops_public.h" #else /* __INLINE_VECTOR_OPS__ */ -#define STORAGE_CLASS_VECTOR_OPS_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_VECTOR_OPS_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_VECTOR_OPS_H static inline +#define STORAGE_CLASS_VECTOR_OPS_C static inline#include "vector_ops_private.h" #endif /* __INLINE_VECTOR_OPS__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vmem.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "vmem_local.h" #ifndef __INLINE_VMEM__ -#define STORAGE_CLASS_VMEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_VMEM_H extern#define STORAGE_CLASS_VMEM_C #include "vmem_public.h"#else /* __INLINE_VMEM__ */ -#define STORAGE_CLASS_VMEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_VMEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_VMEM_H static inline +#define STORAGE_CLASS_VMEM_C static inline#include "vmem_private.h" #endif /* __INLINE_VMEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/xmem.h +3 -4
@@ -29,18 +29,17 @@* - local: system and cell specific constants and identifiers */ -#include "storage_class.h" #include "system_local.h" #include "xmem_local.h" #ifndef __INLINE_XMEM__ -#define STORAGE_CLASS_XMEM_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_XMEM_H extern#define STORAGE_CLASS_XMEM_C #include "xmem_public.h"#else /* __INLINE_XMEM__ */ -#define STORAGE_CLASS_XMEM_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_XMEM_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_XMEM_H static inline +#define STORAGE_CLASS_XMEM_C static inline#include "xmem_private.h" #endif /* __INLINE_XMEM__ */
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c +1 -1
@@ -321,7 +321,7 @@ ia_css_s3a_dmem_decode( }/* MW: this is an ISP function */ -STORAGE_CLASS_INLINE int +static inline int merge_hi_lo_14 (unsigned short hi,unsigned short lo) { int val = (int) ((((unsigned int) hi << 14) & 0xfffc000) |
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c +1 -1
@@ -280,7 +280,7 @@ static ia_css_queue_t *bufq_get_qhandle(/* Local function to initialize a buffer queue. This reduces * the chances of copy-paste errors or typos. */ -STORAGE_CLASS_INLINE void +static inline void init_bufq (unsigned int desc_offset,unsigned int elems_offset,ia_css_queue_t *handle)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h +1 -1
@@ -130,7 +130,7 @@ enum ia_css_debug_enable_param_dump {* @param[in] fmt printf like format string * @param[in] args arguments for the format string */ -STORAGE_CLASS_INLINE void +static inline void ia_css_debug_vdtrace (unsigned int level,const char *fmt,va_list args) {if (ia_css_debug_trace_level >= level)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c +14 -14
@@ -105,7 +105,7 @@ static struct inputfifo_instance/* Streaming to MIPI */ static unsigned inputfifo_wrap_marker ( -/* STORAGE_CLASS_INLINE unsigned inputfifo_wrap_marker( */ +/* static inline unsigned inputfifo_wrap_marker( */ unsigned marker) { return marker |
@@ -113,7 +113,7 @@ static unsigned inputfifo_wrap_marker( (inputfifo_curr_fmt_type << _HIVE_STR_TO_MIPI_FMT_TYPE_LSB); } -STORAGE_CLASS_INLINE void +static inline void _sh_css_fifo_snd (unsigned token) {while (!can_event_send_token (STR2MIPI_EVENT_ID ))
@@ -123,7 +123,7 @@ _sh_css_fifo_snd(unsigned token) }static void inputfifo_send_data_a ( -/* STORAGE_CLASS_INLINE void inputfifo_send_data_a( */ +/* static inline void inputfifo_send_data_a( */ unsigned int data) { unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
@@ -135,7 +135,7 @@ unsigned int data)static void inputfifo_send_data_b ( -/* STORAGE_CLASS_INLINE void inputfifo_send_data_b( */ +/* static inline void inputfifo_send_data_b( */ unsigned int data) { unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
@@ -147,7 +147,7 @@ static void inputfifo_send_data_b(static void inputfifo_send_data ( -/* STORAGE_CLASS_INLINE void inputfifo_send_data( */ +/* static inline void inputfifo_send_data( */ unsigned int a,unsigned int b) {
@@ -162,7 +162,7 @@ static void inputfifo_send_data(static void inputfifo_send_sol (void ) -/* STORAGE_CLASS_INLINE void inputfifo_send_sol(void) */ +/* static inline void inputfifo_send_sol(void) */ {hrt_data token =inputfifo_wrap_marker (1 <<HIVE_STR_TO_MIPI_SOL_BIT );
@@ -174,7 +174,7 @@ static void inputfifo_send_sol(void)static void inputfifo_send_eol (void ) -/* STORAGE_CLASS_INLINE void inputfifo_send_eol(void) */ +/* static inline void inputfifo_send_eol(void) */ {hrt_data token =inputfifo_wrap_marker (1 <<HIVE_STR_TO_MIPI_EOL_BIT );
@@ -185,7 +185,7 @@ static void inputfifo_send_eol(void)static void inputfifo_send_sof (void ) -/* STORAGE_CLASS_INLINE void inputfifo_send_sof(void) */ +/* static inline void inputfifo_send_sof(void) */ {hrt_data token =inputfifo_wrap_marker (1 <<HIVE_STR_TO_MIPI_SOF_BIT );
@@ -197,7 +197,7 @@ static void inputfifo_send_sof(void)static void inputfifo_send_eof (void ) -/* STORAGE_CLASS_INLINE void inputfifo_send_eof(void) */ +/* static inline void inputfifo_send_eof(void) */ {hrt_data token =inputfifo_wrap_marker (1 <<HIVE_STR_TO_MIPI_EOF_BIT );
@@ -209,7 +209,7 @@ static void inputfifo_send_eof(void)#ifdef __ON__static void inputfifo_send_ch_id ( -/* STORAGE_CLASS_INLINE void inputfifo_send_ch_id( */ +/* static inline void inputfifo_send_ch_id( */ unsigned int ch_id) {hrt_data token;
@@ -223,7 +223,7 @@ static void inputfifo_send_ch_id( }static void inputfifo_send_fmt_type ( -/* STORAGE_CLASS_INLINE void inputfifo_send_fmt_type( */ +/* static inline void inputfifo_send_fmt_type( */ unsigned int fmt_type) {hrt_data token;
@@ -240,7 +240,7 @@ static void inputfifo_send_fmt_type(static void inputfifo_send_ch_id_and_fmt_type ( -/* STORAGE_CLASS_INLINE +/* static inline void inputfifo_send_ch_id_and_fmt_type( */ unsigned int ch_id,unsigned int fmt_type)
@@ -259,7 +259,7 @@ void inputfifo_send_ch_id_and_fmt_type( */static void inputfifo_send_empty_token (void ) -/* STORAGE_CLASS_INLINE void inputfifo_send_empty_token(void) */ +/* static inline void inputfifo_send_empty_token(void) */ {hrt_data token =inputfifo_wrap_marker (0 );_sh_css_fifo_snd (token);
@@ -269,7 +269,7 @@ static void inputfifo_send_empty_token(void)static void inputfifo_start_frame ( -/* STORAGE_CLASS_INLINE void inputfifo_start_frame( */ +/* static inline void inputfifo_start_frame( */ unsigned int ch_id,unsigned int fmt_type) {
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/interface/ia_css_rmgr.h +3 -4
@@ -31,15 +31,14 @@ more details.#ifndef _IA_CSS_RMGR_H#define _IA_CSS_RMGR_H -#include "storage_class.h" #include <ia_css_err.h> #ifndef __INLINE_RMGR__ -#define STORAGE_CLASS_RMGR_H STORAGE_CLASS_EXTERN +#define STORAGE_CLASS_RMGR_H extern#define STORAGE_CLASS_RMGR_C #else /* __INLINE_RMGR__ */ -#define STORAGE_CLASS_RMGR_H STORAGE_CLASS_INLINE -#define STORAGE_CLASS_RMGR_C STORAGE_CLASS_INLINE +#define STORAGE_CLASS_RMGR_H static inline +#define STORAGE_CLASS_RMGR_C static inline#endif /* __INLINE_RMGR__ */ /**
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h +2 -2
@@ -961,7 +961,7 @@ struct host_sp_queues {extern int (*sh_css_printf)(const char *fmt,va_list args); -STORAGE_CLASS_INLINE void +static inline void sh_css_print (const char *fmt, ...) {va_list ap;
@@ -973,7 +973,7 @@ sh_css_print(const char *fmt, ...) } } -STORAGE_CLASS_INLINE void +static inline void sh_css_vprint (const char *fmt,va_list args) {if (sh_css_printf)
Signature · 1 line
2.13.6
PATCH 7/7 media: atomisp: make function calls cleaner
In reply to Mauro Carvalho ChehabThe #ifs inside the code makes confusing for reviewers and also
cause problems with smatch:
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2937:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2939:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2941:1: error: directive in argument list
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c +4 -2
@@ -2933,13 +2933,15 @@ static long atomisp_vidioc_default(struct file *file, void *fh,#else if (isp->motor)#endif - err =v4l2_subdev_call (#ifndef ISP2401 + err =v4l2_subdev_call ( isp->inputs[asd->input_curr].motor, + core, ioctl, cmd, arg);#else + err =v4l2_subdev_call ( isp->motor, -#endif core, ioctl, cmd, arg); +#endif else err = v4l2_subdev_call( isp->inputs[asd->input_curr].camera,
Signature · 1 line
2.13.6