staging: media: atomisp queued up patches
Subsystems (5)
Greg Kroah-Hartman
maintainercover staging: media: atomisp queued up patches
Hi Mauro,
Here's the set of accumulated atomisp staging patches that I had in my to-review mailbox. After this, my queue is empty, the driver is all yours! Good Luck! :)
thanks,
greg k-h
Avraham Shukron (3):
staging: media: atomisp: fixed sparse warnings
staging: media: atomisp: fixed coding style errors
staging: media: atomisp: fix coding style warnings
Dan Carpenter (2):
staging: media: atomisp: one char read beyond end of string
staging: media: atomisp: putting NULs in the wrong place
Fabrizio Perria (1):
staging: media: atomisp: Fix unnecessary initialization of static
Guru Das Srinagesh (2):
staging: media: atomisp: use logical AND, not bitwise
staging: media: atomisp: Make undeclared symbols static
Hans de Goede (1):
staging: media: atomisp: Fix -Werror=int-in-bool-context compile
errors
Joe Perches (1):
staging: media: atomisp: Add __printf validation and fix fallout
Manny Vindiola (1):
staging: media: atomisp: fix missing blank line coding style issue in
atomisp_tpg.c
Mauro Carvalho Chehab (1):
staging: media: atomisp: don't treat warnings as errors
Valentin Vidic (1):
staging: media: atomisp: drop unused qos variable
drivers/staging/media/atomisp/i2c/Makefile | 2 - drivers/staging/media/atomisp/i2c/imx/Makefile | 2 - drivers/staging/media/atomisp/i2c/ov5693/Makefile | 2 - .../staging/media/atomisp/pci/atomisp2/Makefile | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 1 - .../media/atomisp/pci/atomisp2/atomisp_fops.c | 14 +- .../media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 + .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- .../css2400/hive_isp_css_include/math_support.h | 6 +- .../css2400/hive_isp_css_include/string_support.h | 9 +- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 6 +- .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 2 +- .../isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 1 + .../css2400/runtime/debug/src/ia_css_debug.c | 6 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 19 +- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 10 +- .../platform/intel-mid/atomisp_gmin_platform.c | 210 +++++++++++---------- .../platform/intel-mid/intel_mid_pcihelpers.c | 12 +- 21 files changed, 162 insertions(+), 151 deletions(-)
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 1/13 staging: media: atomisp: Add __printf validation and fix fallout
From: Joe Perches <[email protected]>
__printf validation adds format and argument validation.
Fix the various broken format/argument mismatches.
--- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 6 +++--- .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 2 +- .../css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 1 + .../atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 6 +++--- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 19 ++++++++++--------- .../media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 10 +++++----- 8 files changed, 25 insertions(+), 23 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c +3 -3
@@ -265,9 +265,9 @@ ia_css_translate_dvs_statistics(assert (isp_stats->hor_proj !=NULL );assert (isp_stats->ver_proj !=NULL ); -IA_CSS_ENTER ("hproj=%p, vproj=%p, haddr=%x, vaddr=%x" , - host_stats->hor_proj, host_stats->ver_proj, - isp_stats->hor_proj, isp_stats->ver_proj); +IA_CSS_ENTER ("hproj=%p, vproj=%p, haddr=%p, vaddr=%p" , + host_stats->hor_proj, host_stats->ver_proj, + isp_stats->hor_proj, isp_stats->ver_proj); hor_num_isp = host_stats->grid.aligned_height; ver_num_isp = host_stats->grid.aligned_width;
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c +1 -1
@@ -213,7 +213,7 @@ ia_css_translate_dvs2_statistics("hor_coefs.even_real=%p, hor_coefs.even_imag=%p, " "ver_coefs.odd_real=%p, ver_coefs.odd_imag=%p, " "ver_coefs.even_real=%p, ver_coefs.even_imag=%p, " -"haddr=%x, vaddr=%x" , +"haddr=%p, vaddr=%p" , host_stats->hor_prod.odd_real, host_stats->hor_prod.odd_imag, host_stats->hor_prod.even_real, host_stats->hor_prod.even_imag, host_stats->ver_prod.odd_real, host_stats->ver_prod.odd_imag,
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c +1 -1
@@ -55,7 +55,7 @@ ia_css_tnr_dump( "tnr_coef", tnr->coef);ia_css_debug_dtrace (level,"\t%-32s = %d\n" ,"tnr_threshold_Y" , tnr->threshold_Y); -ia_css_debug_dtrace (level,"\t%-32s = %d\n" +ia_css_debug_dtrace (level,"\t%-32s = %d\n" ,"tnr_threshold_C" , tnr->threshold_C); }
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h +1 -0
@@ -137,6 +137,7 @@ ia_css_debug_vdtrace(unsigned int level, const char *fmt, va_list args)sh_css_vprint (fmt, args); } +__printf(2, 3)extern void ia_css_debug_dtrace (unsigned int level,const char *fmt, ...);/*! @brief Dump sp thread's stack contents
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c +3 -3
@@ -3148,8 +3148,8 @@ ia_css_debug_dump_pipe_config(ia_css_debug_dump_frame_info (&config->vf_output_info[i],"vf_output_info" ); } -ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"acc_extension: 0x%x\n" , - config->acc_extension); +ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"acc_extension: %p\n" , + config->acc_extension);ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"num_acc_stages: %d\n" , config->num_acc_stages);ia_css_debug_dump_capture_config (&config->default_capture_config);
@@ -3179,7 +3179,7 @@ ia_css_debug_dump_stream_config_source(ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"timeout: %d\n" , config->source.port.timeout);ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"compression: %d\n" , - config->source.port.compression); + config->source.port.compression.type);break ;case IA_CSS_INPUT_MODE_TPG :ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"source.tpg\n" );
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +10 -9
@@ -2003,7 +2003,7 @@ ia_css_enable_isys_event_queue(bool enable)void *sh_css_malloc (size_t size) { -ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"sh_css_malloc() enter: size=%d\n" ,size); +ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"sh_css_malloc() enter: size=%zu\n" ,size);/* FIXME: This first test can probably go away */ if (size ==0 )return NULL ;
@@ -2016,7 +2016,7 @@ void *sh_css_calloc(size_t N, size_t size) {void *p; -ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"sh_css_calloc() enter: N=%d, size=%d\n" ,N ,size); +ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"sh_css_calloc() enter: N=%zu, size=%zu\n" ,N ,size);/* FIXME: this test can probably go away */ if (size >0 ) {
@@ -2059,7 +2059,8 @@ map_sp_threads(struct ia_css_stream *stream, bool map)enum ia_css_pipe_id pipe_id;assert (stream !=NULL ); -IA_CSS_ENTER_PRIVATE ("stream = %p, map = %p" , stream, map); +IA_CSS_ENTER_PRIVATE ("stream = %p, map = %s" , + stream, map ?"true" :"false" );if (stream ==NULL ) {IA_CSS_LEAVE_ERR_PRIVATE (IA_CSS_ERR_INVALID_ARGUMENTS );
@@ -2766,7 +2767,7 @@ enum ia_css_err ia_css_irq_translate( *irq_infos = infos;ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"ia_css_irq_translate() " -"leave: irq_infos=%p\n" , infos); +"leave: irq_infos=%u\n" , infos);return IA_CSS_SUCCESS ; }
@@ -4514,7 +4515,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,#else if (hmm_buffer_record) {#endif -IA_CSS_LOG ("send vbuf=0x%x" , h_vbuf); +IA_CSS_LOG ("send vbuf=%p" , h_vbuf); }else { return_err =IA_CSS_ERR_INTERNAL_ERROR ;IA_CSS_ERROR ("hmm_buffer_record[]: no available slots\n" );
@@ -4624,7 +4625,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,ia_css_rmgr_rel_vbuf (hmm_buffer_pool, &hmm_buffer_record->h_vbuf);sh_css_hmm_buffer_record_reset (hmm_buffer_record); }else { -IA_CSS_ERROR ("hmm_buffer_record not found (0x%p) buf_type(%d)" , +IA_CSS_ERROR ("hmm_buffer_record not found (0x%u) buf_type(%d)" , ddr_buffer_addr, buf_type);IA_CSS_LEAVE_ERR (IA_CSS_ERR_INTERNAL_ERROR );return IA_CSS_ERR_INTERNAL_ERROR ;
@@ -4640,8 +4641,8 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,if ((ddr_buffer.kernel_ptr ==0 ) || (kernel_ptr !=HOST_ADDRESS (ddr_buffer.kernel_ptr))) {IA_CSS_ERROR ("kernel_ptr invalid" ); -IA_CSS_ERROR ("expected: (0x%p)" , kernel_ptr); -IA_CSS_ERROR ("actual: (0x%p)" ,HOST_ADDRESS (ddr_buffer.kernel_ptr)); +IA_CSS_ERROR ("expected: (0x%llx)" , (u64 )kernel_ptr); +IA_CSS_ERROR ("actual: (0x%llx)" , (u64 )HOST_ADDRESS (ddr_buffer.kernel_ptr));IA_CSS_ERROR ("buf_type: %d\n" , buf_type);IA_CSS_LEAVE_ERR (IA_CSS_ERR_INTERNAL_ERROR );return IA_CSS_ERR_INTERNAL_ERROR ;
@@ -6621,7 +6622,7 @@ allocate_delay_frames(struct ia_css_pipe *pipe)IA_CSS_ENTER_PRIVATE ("" );if (pipe ==NULL ) { -IA_CSS_ERROR ("Invalid args - pipe %x" , pipe); +IA_CSS_ERROR ("Invalid args - pipe %p" , pipe);return IA_CSS_ERR_INVALID_ARGUMENTS ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +1 -1
@@ -681,7 +681,7 @@ send_mipi_frames(struct ia_css_pipe *pipe)unsigned int port =0 ;#endif -IA_CSS_ENTER_PRIVATE ("pipe=%d" , pipe); +IA_CSS_ENTER_PRIVATE ("pipe=%p" , pipe);assert (pipe !=NULL );assert (pipe->stream !=NULL );
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c +5 -5
@@ -3375,7 +3375,7 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,#endif if (pipe->scaler_pp_lut == mmgr_NULL) {#ifndef ISP2401 -IA_CSS_LEAVE ("lut(%p) err=%d" , pipe->scaler_pp_lut, err); +IA_CSS_LEAVE ("lut(%u) err=%d" , pipe->scaler_pp_lut, err);return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY ;#else ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
@@ -3397,7 +3397,7 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,#endif } -IA_CSS_LEAVE ("lut(%p) err=%d" , pipe->scaler_pp_lut, err); +IA_CSS_LEAVE ("lut(%u) err=%d" , pipe->scaler_pp_lut, err);return err; }
@@ -3437,7 +3437,7 @@ enum ia_css_err sh_css_params_map_and_store_default_gdc_lut(void)mmgr_store (default_gdc_lut, (int *)interleaved_lut_temp,sizeof (zoom_table)); -IA_CSS_LEAVE_PRIVATE ("lut(%p) err=%d" , default_gdc_lut, err); +IA_CSS_LEAVE_PRIVATE ("lut(%u) err=%d" , default_gdc_lut, err);return err; }
@@ -3859,7 +3859,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,/* When API change is implemented making good distinction between * stream config and pipe config this skipping code can be moved out of the #ifdef */ if (pipe_in && (pipe != pipe_in)) { -IA_CSS_LOG ("skipping pipe %x" , pipe); +IA_CSS_LOG ("skipping pipe %p" , pipe);continue ; }
@@ -4590,7 +4590,7 @@ free_ia_css_isp_parameter_set_info(unsigned int i;hrt_vaddress *addrs = (hrt_vaddress *)&isp_params_info.mem_map; -IA_CSS_ENTER_PRIVATE ("ptr = %p" , ptr); +IA_CSS_ENTER_PRIVATE ("ptr = %u" , ptr);/* sanity check - ptr must be valid */ if (!ia_css_refcount_is_valid (ptr)) {
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 2/13 staging: media: atomisp: use logical AND, not bitwise
In reply to Greg Kroah-HartmanFrom: Guru Das Srinagesh <[email protected]>
Fixes sparse warning "dubious: x & !y" in logical expression.
--- .../media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c +1 -1
@@ -1658,7 +1658,7 @@ ia_css_binary_find(struct ia_css_binary_descr *descr, candidate->internal.max_height);continue ; } -if (!candidate->enable.ds && need_ds & !(xcandidate->num_output_pins >1 )) { +if (!candidate->enable.ds && need_ds && !(xcandidate->num_output_pins >1 )) {ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE ,"ia_css_binary_find() [%d] continue: !%d && %d\n" , __LINE__, candidate->enable.ds, (int )need_ds);
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 3/13 staging: media: atomisp: Fix unnecessary initialization of static
In reply to Greg Kroah-HartmanFrom: Fabrizio Perria <[email protected]>
Fix checkpatch warning: removed unnecessary initialization of static variable "skip_fwload" to 0 in source atomisp_v4l2.c
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +1 -1
@@ -51,7 +51,7 @@/* G-Min addition: pull this in from intel_mid_pm.h */ #define CSTATE_EXIT_LATENCY_C1 1 -static uint skip_fwload =0 ; +static uint skip_fwload;module_param (skip_fwload, uint,0644 );MODULE_PARM_DESC (skip_fwload,"Skip atomisp firmware load" );
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 4/13 staging: media: atomisp: fixed sparse warnings
In reply to Greg Kroah-HartmanFrom: Avraham Shukron <[email protected]>
Added "static" storage class to 4 not-declared functions
--- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +5 -4
@@ -436,7 +436,7 @@ static int gmin_gpio1_ctrl(struct v4l2_subdev *subdev, int on)return -EINVAL ; } -int gmin_v1p2_ctrl (struct v4l2_subdev *subdev,int on) +static int gmin_v1p2_ctrl (struct v4l2_subdev *subdev,int on) {struct gmin_subdev *gs =find_gmin_subdev (subdev);
@@ -455,7 +455,8 @@ int gmin_v1p2_ctrl(struct v4l2_subdev *subdev, int on)return -EINVAL ; } -int gmin_v1p8_ctrl (struct v4l2_subdev *subdev,int on) + +static int gmin_v1p8_ctrl (struct v4l2_subdev *subdev,int on) {struct gmin_subdev *gs =find_gmin_subdev (subdev);int ret;
@@ -491,7 +492,7 @@ int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on)return -EINVAL ; } -int gmin_v2p8_ctrl (struct v4l2_subdev *subdev,int on) +static int gmin_v2p8_ctrl (struct v4l2_subdev *subdev,int on) {struct gmin_subdev *gs =find_gmin_subdev (subdev);int ret;
@@ -527,7 +528,7 @@ int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on)return -EINVAL ; } -int gmin_flisclk_ctrl (struct v4l2_subdev *subdev,int on) +static int gmin_flisclk_ctrl (struct v4l2_subdev *subdev,int on) {int ret =0 ;struct gmin_subdev *gs =find_gmin_subdev (subdev);
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 5/13 staging: media: atomisp: drop unused qos variable
In reply to Greg Kroah-HartmanFrom: Valentin Vidic <[email protected]>
Fixes a sparse warning:
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c:35:5: warning: symbol 'qos' was not declared. Should it be static?
--- drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c +0 -1
@@ -32,7 +32,6 @@ static DEFINE_SPINLOCK(msgbus_lock);static struct pci_dev *pci_root;static struct pm_qos_request pm_qos; -int qos;#define DW_I2C_NEED_QOS (platform_is(INTEL_ATOM_BYT))
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 6/13 staging: media: atomisp: fixed coding style errors
In reply to Greg Kroah-HartmanFrom: Avraham Shukron <[email protected]>
Fix for error (not warnings) reported by checkpatch.pl Specifically:
- missing whitespace around "=" and after ","
- indentation with spaces instead of tabs
- lines starting with a whitespace
This patch does not affect the compiled code in any way.
--- .../platform/intel-mid/atomisp_gmin_platform.c | 156 ++++++++++----------- .../platform/intel-mid/intel_mid_pcihelpers.c | 2 +- 2 files changed, 79 insertions(+), 79 deletions(-)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +78 -78
@@ -51,7 +51,7 @@ struct gmin_subdev {static struct gmin_subdev gmin_subdevs[MAX_SUBDEVS ]; -static enum {PMIC_UNSET =0 ,PMIC_REGULATOR ,PMIC_AXP ,PMIC_TI , +static enum {PMIC_UNSET =0 ,PMIC_REGULATOR ,PMIC_AXP ,PMIC_TI ,PMIC_CRYSTALCOVE } pmic_id;/* The atomisp uses type==0 for the end-of-list marker, so leave space. */
@@ -152,13 +152,13 @@ const struct camera_af_platform_data *camera_get_af_platform_data(void)EXPORT_SYMBOL_GPL (camera_get_af_platform_data);int atomisp_register_i2c_module (struct v4l2_subdev *subdev, -struct camera_sensor_platform_data *plat_data, -enum intel_v4l2_subdev_type type) +struct camera_sensor_platform_data *plat_data, +enum intel_v4l2_subdev_type type) {int i;struct i2c_board_info *bi;struct gmin_subdev *gs; -struct i2c_client *client =v4l2_get_subdevdata (subdev); +struct i2c_client *client =v4l2_get_subdevdata (subdev);struct acpi_device *adev;dev_info (&client->dev,"register atomisp i2c module type %d\n" , type);
@@ -172,7 +172,7 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,if (adev) adev->power.flags.power_resources =0 ; -for (i=0 ; i <MAX_SUBDEVS ; i++) +for (i =0 ; i <MAX_SUBDEVS ; i++)if (!pdata.subdevs[i].type)break ;
@@ -206,7 +206,7 @@ struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter, struct i2c_board_info *board_info) {int i; -for (i=0 ; i <MAX_SUBDEVS && pdata.subdevs[i].type; i++) { +for (i =0 ; i <MAX_SUBDEVS && pdata.subdevs[i].type; i++) {struct intel_v4l2_subdev_table *sd = &pdata.subdevs[i];if (sd->v4l2_subdev.i2c_adapter_id == adapter->nr && sd->v4l2_subdev.board_info.addr == board_info->addr)
@@ -270,45 +270,45 @@ static const struct gmin_cfg_var t100_vars[] = { };static const struct gmin_cfg_var mrd7_vars[] = { - {"INT33F8:00_CamType" ,"1" }, - {"INT33F8:00_CsiPort" ,"1" }, - {"INT33F8:00_CsiLanes" ,"2" }, - {"INT33F8:00_CsiFmt" ,"13" }, - {"INT33F8:00_CsiBayer" ,"0" }, - {"INT33F8:00_CamClk" ,"0" }, - {"INT33F9:00_CamType" ,"1" }, - {"INT33F9:00_CsiPort" ,"0" }, - {"INT33F9:00_CsiLanes" ,"1" }, - {"INT33F9:00_CsiFmt" ,"13" }, - {"INT33F9:00_CsiBayer" ,"0" }, - {"INT33F9:00_CamClk" ,"1" }, - {}, + {"INT33F8:00_CamType" ,"1" }, + {"INT33F8:00_CsiPort" ,"1" }, + {"INT33F8:00_CsiLanes" ,"2" }, + {"INT33F8:00_CsiFmt" ,"13" }, + {"INT33F8:00_CsiBayer" ,"0" }, + {"INT33F8:00_CamClk" ,"0" }, + {"INT33F9:00_CamType" ,"1" }, + {"INT33F9:00_CsiPort" ,"0" }, + {"INT33F9:00_CsiLanes" ,"1" }, + {"INT33F9:00_CsiFmt" ,"13" }, + {"INT33F9:00_CsiBayer" ,"0" }, + {"INT33F9:00_CamClk" ,"1" }, + {}, };static const struct gmin_cfg_var ecs7_vars[] = { - {"INT33BE:00_CsiPort" ,"1" }, - {"INT33BE:00_CsiLanes" ,"2" }, - {"INT33BE:00_CsiFmt" ,"13" }, - {"INT33BE:00_CsiBayer" ,"2" }, - {"INT33BE:00_CamClk" ,"0" }, - {"INT33F0:00_CsiPort" ,"0" }, - {"INT33F0:00_CsiLanes" ,"1" }, - {"INT33F0:00_CsiFmt" ,"13" }, - {"INT33F0:00_CsiBayer" ,"0" }, - {"INT33F0:00_CamClk" ,"1" }, - {"gmin_V2P8GPIO" ,"402" }, - {}, + {"INT33BE:00_CsiPort" ,"1" }, + {"INT33BE:00_CsiLanes" ,"2" }, + {"INT33BE:00_CsiFmt" ,"13" }, + {"INT33BE:00_CsiBayer" ,"2" }, + {"INT33BE:00_CamClk" ,"0" }, + {"INT33F0:00_CsiPort" ,"0" }, + {"INT33F0:00_CsiLanes" ,"1" }, + {"INT33F0:00_CsiFmt" ,"13" }, + {"INT33F0:00_CsiBayer" ,"0" }, + {"INT33F0:00_CamClk" ,"1" }, + {"gmin_V2P8GPIO" ,"402" }, + {}, };static const struct gmin_cfg_var i8880_vars[] = { - {"XXOV2680:00_CsiPort" ,"1" }, - {"XXOV2680:00_CsiLanes" ,"1" }, - {"XXOV2680:00_CamClk" ,"0" }, - {"XXGC0310:00_CsiPort" ,"0" }, - {"XXGC0310:00_CsiLanes" ,"1" }, - {"XXGC0310:00_CamClk" ,"1" }, - {}, + {"XXOV2680:00_CsiPort" ,"1" }, + {"XXOV2680:00_CsiLanes" ,"1" }, + {"XXOV2680:00_CamClk" ,"0" }, + {"XXGC0310:00_CsiPort" ,"0" }, + {"XXGC0310:00_CsiLanes" ,"1" }, + {"XXGC0310:00_CamClk" ,"1" }, + {}, }; static const struct {
@@ -317,9 +317,9 @@ static const struct { } hard_vars[] = { { "BYT-T FFD8", ffrd8_vars }, { "T100TA", t100_vars }, - { "MRD7", mrd7_vars }, - { "ST70408", ecs7_vars }, - { "VTA0803", i8880_vars }, + { "MRD7", mrd7_vars }, + { "ST70408", ecs7_vars }, + { "VTA0803", i8880_vars }, };
@@ -343,7 +343,7 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev) {int i, ret;struct device *dev; -struct i2c_client *client =v4l2_get_subdevdata (subdev); +struct i2c_client *client =v4l2_get_subdevdata (subdev);if (!pmic_id) {
@@ -355,7 +355,7 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev) dev = &client->dev; -for (i=0 ; i <MAX_SUBDEVS && gmin_subdevs[i].subdev; i++) +for (i =0 ; i <MAX_SUBDEVS && gmin_subdevs[i].subdev; i++) ;if (i >=MAX_SUBDEVS )return NULL ;
@@ -410,7 +410,7 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)static struct gmin_subdev *find_gmin_subdev (struct v4l2_subdev *subdev) {int i; -for (i=0 ; i <MAX_SUBDEVS ; i++) +for (i =0 ; i <MAX_SUBDEVS ; i++)if (gmin_subdevs[i].subdev == subdev)return &gmin_subdevs[i];return gmin_subdev_add (subdev);
@@ -482,7 +482,7 @@ static int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on)gpio_set_value (v1p8_gpio, on);if (gs->v1p8_reg) { -regulator_set_voltage (gs->v1p8_reg,1800000 ,1800000 ); +regulator_set_voltage (gs->v1p8_reg,1800000 ,1800000 );if (on)return regulator_enable (gs->v1p8_reg);else
@@ -518,7 +518,7 @@ static int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on)gpio_set_value (v2p8_gpio, on);if (gs->v2p8_reg) { -regulator_set_voltage (gs->v2p8_reg,2900000 ,2900000 ); +regulator_set_voltage (gs->v2p8_reg,2900000 ,2900000 );if (on)return regulator_enable (gs->v2p8_reg);else
@@ -628,13 +628,13 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t *int i, j, ret;unsigned long efilen; -if (dev &&ACPI_COMPANION (dev)) - dev = &ACPI_COMPANION (dev)->dev; +if (dev &&ACPI_COMPANION (dev)) + dev = &ACPI_COMPANION (dev)->dev; -if (dev) - ret =snprintf (var8,sizeof (var8),"%s_%s" ,dev_name (dev), var); -else - ret =snprintf (var8,sizeof (var8),"gmin_%s" , var); +if (dev) + ret =snprintf (var8,sizeof (var8),"%s_%s" ,dev_name (dev), var); +else + ret =snprintf (var8,sizeof (var8),"gmin_%s" , var);if (ret <0 || ret >=sizeof (var8) -1 )return -EINVAL ;
@@ -693,7 +693,7 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t * *out_len = efilen;if (ret) -dev_warn (dev,"Failed to find gmin variable %s\n" , var8); +dev_warn (dev,"Failed to find gmin variable %s\n" , var8);return ret; }
@@ -719,31 +719,31 @@ EXPORT_SYMBOL_GPL(gmin_get_var_int);int camera_sensor_csi (struct v4l2_subdev *sd,u32 port,u32 lanes,u32 format,u32 bayer_order,int flag) { -struct i2c_client *client =v4l2_get_subdevdata (sd); -struct camera_mipi_info *csi =NULL ; - -if (flag) { - csi =kzalloc (sizeof (*csi),GFP_KERNEL ); -if (!csi) { -dev_err (&client->dev,"out of memory\n" ); -return -ENOMEM ; - } - csi->port = port; - csi->num_lanes = lanes; - csi->input_format = format; - csi->raw_bayer_order = bayer_order; -v4l2_set_subdev_hostdata (sd, (void *)csi); - csi->metadata_format =ATOMISP_INPUT_FORMAT_EMBEDDED ; - csi->metadata_effective_width =NULL ; -dev_info (&client->dev, -"camera pdata: port: %d lanes: %d order: %8.8x\n" , - port, lanes, bayer_order); - }else { - csi =v4l2_get_subdev_hostdata (sd); -kfree (csi); - } - -return 0 ; +struct i2c_client *client =v4l2_get_subdevdata (sd); +struct camera_mipi_info *csi =NULL ; + +if (flag) { + csi =kzalloc (sizeof (*csi),GFP_KERNEL ); +if (!csi) { +dev_err (&client->dev,"out of memory\n" ); +return -ENOMEM ; + } + csi->port = port; + csi->num_lanes = lanes; + csi->input_format = format; + csi->raw_bayer_order = bayer_order; +v4l2_set_subdev_hostdata (sd, (void *)csi); + csi->metadata_format =ATOMISP_INPUT_FORMAT_EMBEDDED ; + csi->metadata_effective_width =NULL ; +dev_info (&client->dev, +"camera pdata: port: %d lanes: %d order: %8.8x\n" , + port, lanes, bayer_order); + }else { + csi =v4l2_get_subdev_hostdata (sd); +kfree (csi); + } + +return 0 ; }EXPORT_SYMBOL_GPL (camera_sensor_csi);
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c +1 -1
@@ -22,7 +22,7 @@#endif static inline int platform_is (u8 model) { -return (boot_cpu_data.x86_model == model); +return (boot_cpu_data.x86_model == model); }#include "../../include/asm/intel_mid_pcihelpers.h"
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 7/13 staging: media: atomisp: fix coding style warnings
In reply to Greg Kroah-HartmanFrom: Avraham Shukron <[email protected]>
Fix for warnings reported by checkpatch.pl:
- Multiline comment style
- Bare "unsigned"
- Missing blank line after declarations
- Un-needed braces around single-statement branch
--- .../platform/intel-mid/atomisp_gmin_platform.c | 45 ++++++++++++++-------- .../platform/intel-mid/intel_mid_pcihelpers.c | 9 +++-- 2 files changed, 35 insertions(+), 19 deletions(-)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +30 -15
@@ -119,7 +119,7 @@ static int af_power_ctrl(struct v4l2_subdev *subdev, int flag)/* * The power here is used for dw9817, * regulator is from rear sensor -*/ +*/ if (gs->v2p8_vcm_reg) {if (flag)return regulator_enable (gs->v2p8_vcm_reg);
@@ -167,7 +167,8 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,* uses ACPI runtime power management for camera devices, but * we don't. Disable it, or else the rails will be needlessly * tickled during suspend/resume. This has caused power and -* performance issues on multiple devices. */ +* performance issues on multiple devices. +*/ adev =ACPI_COMPANION (&client->dev);if (adev) adev->power.flags.power_resources =0 ;
@@ -182,7 +183,8 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,/* Note subtlety of initialization order: at the point where * this registration API gets called, the platform data * callbacks have probably already been invoked, so the -* gmin_subdev struct is already initialized for us. */ +* gmin_subdev struct is already initialized for us. +*/ gs =find_gmin_subdev (subdev); pdata.subdevs[i].type = type;
@@ -206,8 +208,10 @@ struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter, struct i2c_board_info *board_info) {int i; +for (i =0 ; i <MAX_SUBDEVS && pdata.subdevs[i].type; i++) {struct intel_v4l2_subdev_table *sd = &pdata.subdevs[i]; +if (sd->v4l2_subdev.i2c_adapter_id == adapter->nr && sd->v4l2_subdev.board_info.addr == board_info->addr)return sd->subdev;
@@ -261,7 +265,8 @@ static const struct gmin_cfg_var ffrd8_vars[] = { };/* Cribbed from MCG defaults in the mt9m114 driver, not actually verified -* vs. T100 hardware */ +* vs. T100 hardware +*/ static const struct gmin_cfg_var t100_vars[] = { {"INT33F0:00_CsiPort" ,"0" }, {"INT33F0:00_CsiLanes" ,"1" },
@@ -345,10 +350,8 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)struct device *dev;struct i2c_client *client =v4l2_get_subdevdata (subdev); -if (!pmic_id) { - - pmic_id =PMIC_REGULATOR ; - } +if (!pmic_id) + pmic_id =PMIC_REGULATOR ;if (!client)return NULL ;
@@ -401,7 +404,8 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)* API is broken with the current drivers, returning * "1" for a regulator that will then emit a * "unbalanced disable" WARNing if we try to disable -* it. */ +* it. +*/ }return &gmin_subdevs[i];
@@ -410,6 +414,7 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)static struct gmin_subdev *find_gmin_subdev (struct v4l2_subdev *subdev) {int i; +for (i =0 ; i <MAX_SUBDEVS ; i++)if (gmin_subdevs[i].subdev == subdev)return &gmin_subdevs[i];
@@ -419,6 +424,7 @@ static struct gmin_subdev *find_gmin_subdev(struct v4l2_subdev *subdev)static int gmin_gpio0_ctrl (struct v4l2_subdev *subdev,int on) {struct gmin_subdev *gs =find_gmin_subdev (subdev); +if (gs && gs->gpio0) {gpiod_set_value (gs->gpio0, on);return 0 ;
@@ -429,6 +435,7 @@ static int gmin_gpio0_ctrl(struct v4l2_subdev *subdev, int on)static int gmin_gpio1_ctrl (struct v4l2_subdev *subdev,int on) {struct gmin_subdev *gs =find_gmin_subdev (subdev); +if (gs && gs->gpio1) {gpiod_set_value (gs->gpio1, on);return 0 ;
@@ -532,6 +539,7 @@ static int gmin_flisclk_ctrl(struct v4l2_subdev *subdev, int on) {int ret =0 ;struct gmin_subdev *gs =find_gmin_subdev (subdev); +if (on) ret =vlv2_plat_set_clock_freq (gs->clock_num, gs->clock_src);if (ret)
@@ -596,6 +604,7 @@ struct camera_sensor_platform_data *gmin_camera_platform_data( enum atomisp_bayer_order csi_bayer) {struct gmin_subdev *gs =find_gmin_subdev (subdev); + gs->csi_fmt = csi_format; gs->csi_bayer = csi_bayer;
@@ -618,8 +627,10 @@ EXPORT_SYMBOL_GPL(atomisp_gmin_register_vcm_control);/* Retrieves a device-specific configuration variable. The dev * argument should be a device with an ACPI companion, as all -* configuration is based on firmware ID. */ -int gmin_get_config_var (struct device *dev,const char *var,char *out,size_t *out_len) +* configuration is based on firmware ID. +*/ +int gmin_get_config_var (struct device *dev,const char *var,char *out, +size_t *out_len) {char var8[CFG_VAR_NAME_MAX ];efi_char16_t var16[CFG_VAR_NAME_MAX ];
@@ -641,7 +652,8 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t */* First check a hard-coded list of board-specific variables. * Some device firmwares lack the ability to set EFI variables at -* runtime. */ +* runtime. +*/ for (i =0 ; i <ARRAY_SIZE (hard_vars); i++) {if (dmi_match (DMI_BOARD_NAME , hard_vars[i].dmi_board_name)) {for (j =0 ; hard_vars[i].vars[j].name; j++) {
@@ -666,7 +678,8 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t * }/* Our variable names are ASCII by construction, but EFI names -* are wide chars. Convert and zero-pad. */ +* are wide chars. Convert and zero-pad. +*/ memset (var16,0 ,sizeof (var16));for (i =0 ; i <sizeof (var8) && var8[i]; i++) var16[i] = var8[i];
@@ -679,7 +692,8 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t ** implementation simply uses VariableName and VendorGuid from * the struct and ignores the rest, but it seems like there * ought to be an "official" efivar_entry registered -* somewhere? */ +* somewhere? +*/ ev =kzalloc (sizeof (*ev),GFP_KERNEL );if (!ev)return -ENOMEM ;
@@ -750,7 +764,8 @@ EXPORT_SYMBOL_GPL(camera_sensor_csi);/* PCI quirk: The BYT ISP advertises PCI runtime PM but it doesn't * work. Disable so the kernel framework doesn't hang the device * trying. The driver itself does direct calls to the PUNIT to manage -* ISP power. */ +* ISP power. +*/ static void isp_pm_cap_fixup (struct pci_dev *dev) {dev_info (&dev->dev,"Disabling PCI power management on camera ISP\n" );
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c +5 -4
@@ -5,7 +5,8 @@/* G-Min addition: "platform_is()" lives in intel_mid_pm.h in the MCG * tree, but it's just platform ID info and we don't want to pull in -* the whole SFI-based PM architecture. */ +* the whole SFI-based PM architecture. +*/ #define INTEL_ATOM_MRST 0x26#define INTEL_ATOM_MFLD 0x27#define INTEL_ATOM_CLV 0x35
@@ -135,8 +136,8 @@ u32 intel_mid_msgbus_read32(u8 port, u32 addr)return data; } -EXPORT_SYMBOL (intel_mid_msgbus_read32); +void intel_mid_msgbus_write32 (u8 port,u32 addr,u32 data) {unsigned long irq_flags;
@@ -170,8 +171,8 @@ EXPORT_SYMBOL(intel_mid_soc_stepping);static bool is_south_complex_device (struct pci_dev *dev) { -unsigned base_class = dev->class >>16 ; -unsigned sub_class = (dev->class &SUB_CLASS_MASK ) >>8 ; +unsigned int base_class = dev->class >>16 ; +unsigned int sub_class = (dev->class &SUB_CLASS_MASK ) >>8 ;/* other than camera, pci bridges and display, * everything else are south complex devices.
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 8/13 staging: media: atomisp: Make undeclared symbols static
In reply to Greg Kroah-HartmanFrom: Guru Das Srinagesh <[email protected]>
Fix sparse warnings: "symbol not declared; should it be static?"
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c +7 -7
@@ -130,9 +130,9 @@ static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,return 0 ; } -int atomisp_q_one_s3a_buffer (struct atomisp_sub_device *asd, -enum atomisp_input_stream_id stream_id, -enum atomisp_css_pipe_id css_pipe_id) +static int atomisp_q_one_s3a_buffer (struct atomisp_sub_device *asd, +enum atomisp_input_stream_id stream_id, +enum atomisp_css_pipe_id css_pipe_id) {struct atomisp_s3a_buf *s3a_buf;struct list_head *s3a_list;
@@ -172,9 +172,9 @@ int atomisp_q_one_s3a_buffer(struct atomisp_sub_device *asd,return 0 ; } -int atomisp_q_one_dis_buffer (struct atomisp_sub_device *asd, -enum atomisp_input_stream_id stream_id, -enum atomisp_css_pipe_id css_pipe_id) +static int atomisp_q_one_dis_buffer (struct atomisp_sub_device *asd, +enum atomisp_input_stream_id stream_id, +enum atomisp_css_pipe_id css_pipe_id) {struct atomisp_dis_buf *dis_buf;unsigned long irqflags;
@@ -744,7 +744,7 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)/* * file operation functions */ -unsigned int atomisp_subdev_users (struct atomisp_sub_device *asd) +static unsigned int atomisp_subdev_users (struct atomisp_sub_device *asd) {return asd->video_out_preview.users + asd->video_out_vf.users +
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 9/13 staging: media: atomisp: Fix -Werror=int-in-bool-context compile errors
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
With gcc-7.1.1 I was getting the following compile error:
error: ‘*’ in boolean context, suggest ‘&&’ instead
The problem is the definition of CEIL_DIV:
#define CEIL_DIV(a, b) ((b) ? ((a) + (b) - 1) / (b) : 0)
Which when called as: CEIL_DIV(x, y * z) triggers this error, note we cannot do as the error suggests since b is evaluated multiple times.
This commit fixes these compile errors.
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 1 - .../pci/atomisp2/css2400/hive_isp_css_include/math_support.h | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c +0 -1
@@ -2506,7 +2506,6 @@ static void __configure_capture_pp_input(struct atomisp_sub_device *asd,struct ia_css_pipe_extra_config *pipe_extra_configs = &stream_env->pipe_extra_configs[pipe_id];unsigned int hor_ds_factor =0 , ver_ds_factor =0 ; -#define CEIL_DIV (a, b) ((b) ? ((a) + (b) - 1) / (b) : 0)if (width ==0 && height ==0 )return ;
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h +3 -3
@@ -62,15 +62,15 @@#define MAX (a, b) (((a) > (b)) ? (a) : (b))#define MIN (a, b) (((a) < (b)) ? (a) : (b))#ifdef ISP2401 -#define ROUND_DIV (a, b) ((b) ? ((a) + ((b) >> 1)) / (b) : 0) +#define ROUND_DIV (a, b) (((b) != 0) ? ((a) + ((b) >> 1)) / (b) : 0)#endif -#define CEIL_DIV (a, b) ((b) ? ((a) + (b) - 1) / (b) : 0) +#define CEIL_DIV (a, b) (((b) != 0) ? ((a) + (b) - 1) / (b) : 0)#define CEIL_MUL (a, b) (CEIL_DIV(a, b) * (b))#define CEIL_MUL2 (a, b) (((a) + (b) - 1) & ~((b) - 1))#define CEIL_SHIFT (a, b) (((a) + (1 << (b)) - 1)>>(b))#define CEIL_SHIFT_MUL (a, b) (CEIL_SHIFT(a, b) << (b))#ifdef ISP2401 -#define ROUND_HALF_DOWN_DIV (a, b) ((b) ? ((a) + (b / 2) - 1) / (b) : 0) +#define ROUND_HALF_DOWN_DIV (a, b) (((b) != 0) ? ((a) + (b / 2) - 1) / (b) : 0)#define ROUND_HALF_DOWN_MUL (a, b) (ROUND_HALF_DOWN_DIV(a, b) * (b))#endif
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 10/13 staging: media: atomisp: one char read beyond end of string
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
We should verify that "ix < max_len" before we test whether we have reached the NUL terminator.
--- .../pci/atomisp2/css2400/hive_isp_css_include/string_support.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h +2 -3
@@ -72,9 +72,8 @@ static size_t strnlen_s(return 0 ; } -for (ix=0 ; - ((src_str[ix] !='\0' ) && (ix< max_len)); - ++ix)/*Nothing else to do*/ ; +for (ix =0 ; ix < max_len && src_str[ix] !='\0' ; ix++) + ;/* On Error, it will return src_size == max_len*/ return ix;
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 11/13 staging: media: atomisp: putting NULs in the wrong place
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
We're putting the NUL terminators one space beyond where they belong. This doesn't show up in testing because all but the callers put a NUL in the correct place themselves. LOL. It causes a static checker warning about buffer overflows.
--- .../pci/atomisp2/css2400/hive_isp_css_include/string_support.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h +2 -2
@@ -117,7 +117,7 @@ STORAGE_CLASS_INLINE int strncpy_s(/* dest_str is big enough for the len */ strncpy (dest_str, src_str, len); - dest_str[len+1 ] ='\0' ; + dest_str[len] ='\0' ;return 0 ; }
@@ -157,7 +157,7 @@ STORAGE_CLASS_INLINE int strcpy_s(/* dest_str is big enough for the len */ strncpy (dest_str, src_str, len); - dest_str[len+1 ] ='\0' ; + dest_str[len] ='\0' ;return 0 ; }
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 12/13 staging: media: atomisp: fix missing blank line coding style issue in atomisp_tpg.c
In reply to Greg Kroah-HartmanFrom: Manny Vindiola <[email protected]>
This is a patch to the atomisp_tpg.c file that fixes up a missing blank line warning found by the checkpatch.pl tool
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c +1 -0
@@ -56,6 +56,7 @@ static int tpg_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_format *format) {struct v4l2_mbus_framefmt *fmt = &format->format; +if (format->pad)return -EINVAL ;/* only raw8 grbg is supported by TPG */
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerPATCH 13/13 staging: media: atomisp: don't treat warnings as errors
In reply to Greg Kroah-HartmanFrom: Mauro Carvalho Chehab <[email protected]>
Several atomisp files use:
ccflags-y += -Werror
As, on media, our usual procedure is to use W=1, and atomisp has *a lot* of warnings with such flag enabled,like:
./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h:62:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]
At the end, it causes our build to fail, impacting our workflow.
So, remove this crap. If one wants to force -Werror, he can still build with it enabled by passing a parameter to make.
--- drivers/staging/media/atomisp/i2c/Makefile | 2 -- drivers/staging/media/atomisp/i2c/imx/Makefile | 2 -- drivers/staging/media/atomisp/i2c/ov5693/Makefile | 2 -- drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-)
drivers/staging/media/atomisp/i2c/Makefile +0 -2
@@ -19,5 +19,3 @@ obj-$(CONFIG_VIDEO_AP1302) += ap1302.o obj-$(CONFIG_VIDEO_LM3554) += lm3554.o -ccflags-y += -Werror -
drivers/staging/media/atomisp/i2c/imx/Makefile +0 -2
@@ -4,5 +4,3 @@ imx1x5-objs := imx.o drv201.o ad5816g.o dw9714.o dw9719.o dw9718.o vcm.o otp.o o ov8858_driver-objs := ../ov8858.o dw9718.o vcm.o obj-$(CONFIG_VIDEO_OV8858) += ov8858_driver.o - -ccflags-y += -Werror
drivers/staging/media/atomisp/i2c/ov5693/Makefile +0 -2
@@ -1,3 +1 @@ obj-$(CONFIG_VIDEO_OV5693) += ov5693.o - -ccflags-y += -Werror
drivers/staging/media/atomisp/pci/atomisp2/Makefile +1 -1
@@ -351,5 +351,5 @@ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__ DEFINES += -DATOMISP_POSTFIX=\"css2400b0_v21\" -DISP2400B0 DEFINES += -DSYSTEM_hive_isp_css_2400_system -DISP2400 -ccflags-y += $(INCLUDES) $(DEFINES) -fno-common -Werror +ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
Signature · 1 line
2.13.0
Em Thu, 18 May 2017 15:50:09 +0200
Greg Kroah-Hartman <[email protected]> escreveu:
Quoted 5 lines
Hi Mauro,
Here's the set of accumulated atomisp staging patches that I had in my to-review mailbox. After this, my queue is empty, the driver is all yours!
Thanks!
Alan, please let me know if you prefer if I don't apply any of such patches, otherwise I should be merging them tomorrow ;)
Quoted 1 line
Good Luck! :)
Thanks!
Regards,
Mauro
Quoted 52 lines
thanks,
greg k-h
Avraham Shukron (3):
staging: media: atomisp: fixed sparse warnings
staging: media: atomisp: fixed coding style errors
staging: media: atomisp: fix coding style warningsDan Carpenter (2):
staging: media: atomisp: one char read beyond end of string
staging: media: atomisp: putting NULs in the wrong placeFabrizio Perria (1):
staging: media: atomisp: Fix unnecessary initialization of staticGuru Das Srinagesh (2):
staging: media: atomisp: use logical AND, not bitwise
staging: media: atomisp: Make undeclared symbols staticHans de Goede (1):
staging: media: atomisp: Fix -Werror=int-in-bool-context compile
errorsJoe Perches (1):
staging: media: atomisp: Add__printfvalidation and fix falloutManny Vindiola (1):
staging: media: atomisp: fix missing blank line coding style issue in
atomisp_tpg.cMauro Carvalho Chehab (1):
staging: media: atomisp: don't treat warnings as errorsValentin Vidic (1):
staging: media: atomisp: drop unused qos variabledrivers/staging/media/atomisp/i2c/Makefile | 2 - drivers/staging/media/atomisp/i2c/imx/Makefile | 2 - drivers/staging/media/atomisp/i2c/ov5693/Makefile | 2 - .../staging/media/atomisp/pci/atomisp2/Makefile | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 1 - .../media/atomisp/pci/atomisp2/atomisp_fops.c | 14 +- .../media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 + .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- .../css2400/hive_isp_css_include/math_support.h | 6 +- .../css2400/hive_isp_css_include/string_support.h | 9 +- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 6 +- .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 2 +- .../isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 2 +-
Quoted 9 lines
.../css2400/runtime/debug/interface/ia_css_debug.h | 1 + .../css2400/runtime/debug/src/ia_css_debug.c | 6 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 19 +- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 10 +- .../platform/intel-mid/atomisp_gmin_platform.c | 210 +++++++++++---------- .../platform/intel-mid/intel_mid_pcihelpers.c | 12 +- 21 files changed, 162 insertions(+), 151 deletions(-)
Thanks,
Mauro
Quoted 12 lines · Mauro Carvalho Chehab
Em Thu, 18 May 2017 15:50:09 +0200
Greg Kroah-Hartman <[email protected]> escreveu:Quoted 8 lines
Hi Mauro,
Here's the set of accumulated atomisp staging patches that I had in my
to-review mailbox. After this, my queue is empty, the driver is all
yours!
Quoted 4 lines
Thanks!
Alan, please let me know if you prefer if I don't apply any of such patches, otherwise I should be merging them tomorrow ;)
I will assume you've merged them and resync the internal patch queue I have here to that. At the moment I'm still slowly trying to unthread some of the fascinating layers of indirection without actually breaking anything.
Alan
Em Thu, 18 May 2017 17:40:27 +0100
Alan Cox <[email protected]> escreveu:
Quoted 13 lines · Mauro Carvalho Chehab
Quoted 12 lines
Em Thu, 18 May 2017 15:50:09 +0200
Greg Kroah-Hartman <[email protected]> escreveu:Quoted 8 lines
Hi Mauro,
Here's the set of accumulated atomisp staging patches that I had in my
to-review mailbox. After this, my queue is empty, the driver is all
yours!
Quoted 7 lines
Quoted 4 lines
Thanks!
Alan, please let me know if you prefer if I don't apply any of such patches, otherwise I should be merging them tomorrow ;)
I will assume you've merged them and resync the internal patch queue I have here to that.
Merged, thanks! I'll also merge a patch I just sent with disables several warnings that W=1 would otherwise turn on. They indicate real issues there, but, as you pointed, there are much more important tasks to to than to try fixing those warnings.
Quoted 3 lines
At the moment I'm still slowly trying to unthread
some of the fascinating layers of indirection without actually breaking anything.
I don't envy you trying to get some sense out of it ;-)
Good luck!
Thanks,
Mauro