staging: media: imx: fix parenthesis ending checks
PATCH v3 1/1 staging: media: imx: fix parenthesis ending checks
Remove 4 checks for ending with a parenthesis by removing unnecessary line breaks, and forward declare a variable for a function call that would otherwise remain over 80 columns.
---
v3: fix commit message
---
--- drivers/staging/media/imx/imx-ic-prpencvf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/staging/media/imx/imx-ic-prpencvf.c +6 -10
@@ -315,8 +315,7 @@ static void prp_setup_vb2_buf(struct prp_priv *priv, dma_addr_t *phys) buf =imx_media_capture_device_next_buf (vdev);if (buf) { priv->active_vb2_buf[i] = buf; - phys[i] =vb2_dma_contig_plane_dma_addr ( - &buf->vbuf.vb2_buf,0 ); + phys[i] =vb2_dma_contig_plane_dma_addr (&buf->vbuf.vb2_buf,0 ); }else { priv->active_vb2_buf[i] =NULL ; phys[i] = priv->underrun_buf.phys;
@@ -704,11 +703,9 @@ static int prp_start(struct prp_priv *priv) }if (ipu_rot_mode_is_irt (priv->rot_mode)) - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF );else - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); ret = devm_request_irq(ic_priv->ipu_dev, priv->eof_irq, prp_eof_interrupt, 0,
@@ -750,7 +747,7 @@ static int prp_start(struct prp_priv *priv)static void prp_stop (struct prp_priv *priv) {struct imx_ic_priv *ic_priv = priv->ic_priv; -unsigned long flags; +unsigned long flags, timeout_in_jiffies;int ret;/* mark next EOF interrupt as the last before stream off */
@@ -761,9 +758,8 @@ static void prp_stop(struct prp_priv *priv)/* * and then wait for interrupt handler to mark completion. */ - ret =wait_for_completion_timeout ( - &priv->last_eof_comp, -msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT )); + timeout_in_jiffies =msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT ); + ret =wait_for_completion_timeout (&priv->last_eof_comp, timeout_in_jiffies);if (ret ==0 )v4l2_warn (&ic_priv->sd,"wait last EOF timeout\n" );
Signature · 1 line
2.53.0
Quoted 6 lines · Mark Adamenko
Remove 4 checks for ending with a parenthesis by removing unnecessary line breaks, and forward declare a variable for a function call that would otherwise remain over 80 columns.
Signed-off-by Mark Adamenko <[email protected]>---
Quoted 58 lines
v3: fix commit message
------ drivers/staging/media/imx/imx-ic-prpencvf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)drivers/staging/media/imx/imx-ic-prpencvf.c +6
-11@@ -315,8 +315,7 @@ static void prp_setup_vb2_buf(struct prp_priv *priv, dma_addr_t *phys) buf =imx_media_capture_device_next_buf (vdev);if (buf) { priv->active_vb2_buf[i] = buf; - phys[i] =vb2_dma_contig_plane_dma_addr ( - &buf->vbuf.vb2_buf,0 ); + phys[i] =vb2_dma_contig_plane_dma_addr (&buf->vbuf.vb2_buf,0 ); }else { priv->active_vb2_buf[i] =NULL ; phys[i] = priv->underrun_buf.phys;@@ -704,11 +703,9 @@ static int prp_start(struct prp_priv *priv) }if (ipu_rot_mode_is_irt (priv->rot_mode)) - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF );else - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); ret = devm_request_irq(ic_priv->ipu_dev, priv->eof_irq, prp_eof_interrupt, 0,@@ -750,7 +747,7 @@ static int prp_start(struct prp_priv *priv)static void prp_stop (struct prp_priv *priv) {struct imx_ic_priv *ic_priv = priv->ic_priv; -unsigned long flags; +unsigned long flags, timeout_in_jiffies;int ret;/* mark next EOF interrupt as the last before stream off */ @@ -761,9 +758,8 @@ static void prp_stop(struct prp_priv *priv)/* * and then wait for interrupt handler to mark completion. */ - ret =wait_for_completion_timeout ( - &priv->last_eof_comp, -msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT )); + timeout_in_jiffies =msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT ); + ret =wait_for_completion_timeout (&priv->last_eof_comp, timeout_in_jiffies);if (ret ==0 )v4l2_warn (&ic_priv->sd,"wait last EOF timeout\n" ); --2.53.0
Quoted 5 lines · Mark Adamenko
Remove 4 checks for ending with a parenthesis by removing unnecessary line breaks, and forward declare a variable for a function call that would otherwise remain over 80 columns.
Applied, thanks!
[1/1] staging: media: imx: fix parenthesis ending checks
commit: 616d687e7d419cd7f6464f37b8d1906fd351fd53
Best regards,
Signature · 1 line
Frank Li <[email protected]>
Hi Mark,
Quoted 3 lines · Mark Adamenko
Remove 4 checks for ending with a parenthesis by removing unnecessary line breaks, and forward declare a variable for a function call that would otherwise remain over 80 columns.
Sorry, but I'm rejecting this patch: it just swaps one 'problem' (parenthesis ending check) with another problem: long lines.
In the end the current version is just more readable, so I'm just dropping this patch.
Regards,
Hans
Quoted 58 lines
Signed-off-by Mark Adamenko <[email protected]>---
v3: fix commit message
------ drivers/staging/media/imx/imx-ic-prpencvf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)drivers/staging/media/imx/imx-ic-prpencvf.c +6
-10@@ -315,8 +315,7 @@ static void prp_setup_vb2_buf(struct prp_priv *priv, dma_addr_t *phys) buf =imx_media_capture_device_next_buf (vdev);if (buf) { priv->active_vb2_buf[i] = buf; - phys[i] =vb2_dma_contig_plane_dma_addr ( - &buf->vbuf.vb2_buf,0 ); + phys[i] =vb2_dma_contig_plane_dma_addr (&buf->vbuf.vb2_buf,0 ); }else { priv->active_vb2_buf[i] =NULL ; phys[i] = priv->underrun_buf.phys;@@ -704,11 +703,9 @@ static int prp_start(struct prp_priv *priv) }if (ipu_rot_mode_is_irt (priv->rot_mode)) - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->rot_out_ch,IPU_IRQ_EOF );else - priv->eof_irq =ipu_idmac_channel_irq ( - ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); + priv->eof_irq =ipu_idmac_channel_irq (ic_priv->ipu, priv->out_ch,IPU_IRQ_EOF ); ret = devm_request_irq(ic_priv->ipu_dev, priv->eof_irq, prp_eof_interrupt, 0,@@ -750,7 +747,7 @@ static int prp_start(struct prp_priv *priv)static void prp_stop (struct prp_priv *priv) {struct imx_ic_priv *ic_priv = priv->ic_priv; -unsigned long flags; +unsigned long flags, timeout_in_jiffies;int ret;/* mark next EOF interrupt as the last before stream off */ @@ -761,9 +758,8 @@ static void prp_stop(struct prp_priv *priv)/* * and then wait for interrupt handler to mark completion. */ - ret =wait_for_completion_timeout ( - &priv->last_eof_comp, -msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT )); + timeout_in_jiffies =msecs_to_jiffies (IMX_MEDIA_EOF_TIMEOUT ); + ret =wait_for_completion_timeout (&priv->last_eof_comp, timeout_in_jiffies);if (ret ==0 )v4l2_warn (&ic_priv->sd,"wait last EOF timeout\n" );