media:atomisp:pci Remove unnecessary variable
Subsystems (4)
PATCH 1/1 media:atomisp:pci Remove unnecessary variable
Remove the local variable "ret" because its initial value does not change during the function execution.
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 ++--- .../media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c +2 -3
@@ -557,8 +557,6 @@ const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(u32static int atomisp_querycap (struct file *file,void *fh,struct v4l2_capability *cap) { -int ret =0 ; -memset (cap,0 ,sizeof (struct v4l2_capability )); WARN_ON(sizeof(DRIVER) > sizeof(cap->driver) ||
@@ -574,7 +572,8 @@ static int atomisp_querycap(struct file *file, void *fh, cap->device_caps =V4L2_CAP_VIDEO_CAPTURE |V4L2_CAP_STREAMING |V4L2_CAP_VIDEO_OUTPUT ; cap->capabilities = cap->device_caps |V4L2_CAP_DEVICE_CAPS ; -return ret; + +return 0 ; }/*
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c +1 -3
@@ -105,8 +105,6 @@ input_system_error_t ia_css_isys_init(void)#elif defined(USE_INPUT_SYSTEM_VERSION_2401 )input_system_error_t ia_css_isys_init (void ) { -input_system_error_t error =INPUT_SYSTEM_ERR_NO_ERROR ; -ia_css_isys_csi_rx_lut_rmgr_init ();ia_css_isys_ibuf_rmgr_init ();ia_css_isys_dma_channel_rmgr_init ();
@@ -120,7 +118,7 @@ input_system_error_t ia_css_isys_init(void)isys_irqc_status_enable (ISYS_IRQ1_ID );isys_irqc_status_enable (ISYS_IRQ2_ID ); - return error; + return INPUT_SYSTEM_ERR_NO_ERROR; }#endif
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +1 -3
@@ -37,12 +37,10 @@ enum ia_css_err ia_css_mipi_frame_specify(const unsigned int size_mem_words, const bool contiguous) { - enum ia_css_err err = IA_CSS_SUCCESS; - my_css.size_mem_words = size_mem_words; (void )contiguous; -return err; +return IA_CSS_SUCCESS ; }#ifdef ISP2401
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c +1 -2
@@ -825,7 +825,6 @@ configure_isp_from_args( bool two_ppc, bool deinterleaved) { -enum ia_css_err err =IA_CSS_SUCCESS ;#ifdef ISP2401 struct ia_css_pipe *pipe =find_pipe_by_num (pipeline->pipe_num);const struct ia_css_resolution *res;
@@ -853,7 +852,7 @@ configure_isp_from_args(/* Remove support for TNR2 once TNR3 fully integrated */ ia_css_tnr3_configure (binary, (const struct ia_css_frame **)args->tnr_frames);#endif -return err; +return IA_CSS_SUCCESS ; } static void
Signature · 1 line
2.7.4
The subject one doesn't seem standard. Normally there are at least spaces after the :s. In general, use got long --oneline on each file to see what others have done, and try to come up with something that covers the affected files.
julia
Quoted 105 lines · Georgiana Rodica Chelu
Remove the local variable "ret" because its initial value does not change during the function execution.
Signed-off-by Georgiana Rodica Chelu <[email protected]>--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 ++--- .../media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-)drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c +2
-3@@ -557,8 +557,6 @@ const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(u32static int atomisp_querycap (struct file *file,void *fh,struct v4l2_capability *cap) { -int ret =0 ; -memset (cap,0 ,sizeof (struct v4l2_capability )); WARN_ON(sizeof(DRIVER) > sizeof(cap->driver) ||@@ -574,7 +572,8 @@ static int atomisp_querycap(struct file *file, void *fh, cap->device_caps =V4L2_CAP_VIDEO_CAPTURE |V4L2_CAP_STREAMING |V4L2_CAP_VIDEO_OUTPUT ; cap->capabilities = cap->device_caps |V4L2_CAP_DEVICE_CAPS ; -return ret; + +return 0 ; }/* drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c +1
-3@@ -105,8 +105,6 @@ input_system_error_t ia_css_isys_init(void)#elif defined(USE_INPUT_SYSTEM_VERSION_2401 )input_system_error_t ia_css_isys_init (void ) { -input_system_error_t error =INPUT_SYSTEM_ERR_NO_ERROR ; -ia_css_isys_csi_rx_lut_rmgr_init ();ia_css_isys_ibuf_rmgr_init ();ia_css_isys_dma_channel_rmgr_init ();@@ -120,7 +118,7 @@ input_system_error_t ia_css_isys_init(void)isys_irqc_status_enable (ISYS_IRQ1_ID );isys_irqc_status_enable (ISYS_IRQ2_ID ); - return error; + return INPUT_SYSTEM_ERR_NO_ERROR; }#endif drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +1
-3@@ -37,12 +37,10 @@ enum ia_css_err ia_css_mipi_frame_specify(const unsigned int size_mem_words, const bool contiguous) { - enum ia_css_err err = IA_CSS_SUCCESS; - my_css.size_mem_words = size_mem_words; (void )contiguous; -return err; +return IA_CSS_SUCCESS ; }#ifdef ISP2401 drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c +1
-3@@ -825,7 +825,6 @@ configure_isp_from_args( bool two_ppc, bool deinterleaved) { -enum ia_css_err err =IA_CSS_SUCCESS ;#ifdef ISP2401 struct ia_css_pipe *pipe =find_pipe_by_num (pipeline->pipe_num);const struct ia_css_resolution *res;@@ -853,7 +852,7 @@ configure_isp_from_args(/* Remove support for TNR2 once TNR3 fully integrated */ ia_css_tnr3_configure (binary, (const struct ia_css_frame **)args->tnr_frames);#endif -return err; +return IA_CSS_SUCCESS ; } static void --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170306192538.GA5241%40fireworks.
For more options, visit https://groups.google.com/d/optout.