diff mbox series

[v3,14/15] media: qcom: camss: Convert vfe_disable() from int to void

Message ID 20230823104444.1954663-15-bryan.odonoghue@linaro.org
State New
Headers show
Series media: qcom: camss: Add parameter passing to remove several outstanding bugs | expand

Commit Message

Bryan O'Donoghue Aug. 23, 2023, 10:44 a.m. UTC
No version of vfe_disable() currently returns nor has ever as near as I
can discern ever returned a meaningful error code.

Convert from the unused int return to void.

Fixes: 633b388f85c5 ("media: camss: Refactor VFE HW version support")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss-vfe-170.c  | 5 ++---
 drivers/media/platform/qcom/camss/camss-vfe-480.c  | 5 ++---
 drivers/media/platform/qcom/camss/camss-vfe-gen1.c | 5 ++---
 drivers/media/platform/qcom/camss/camss-vfe-gen1.h | 3 +--
 drivers/media/platform/qcom/camss/camss-vfe.c      | 5 +----
 drivers/media/platform/qcom/camss/camss-vfe.h      | 2 +-
 6 files changed, 9 insertions(+), 16 deletions(-)

Comments

Konrad Dybcio Aug. 26, 2023, 10:16 a.m. UTC | #1
On 23.08.2023 12:44, Bryan O'Donoghue wrote:
> No version of vfe_disable() currently returns nor has ever as near as I
> can discern ever returned a meaningful error code.
> 
> Convert from the unused int return to void.
> 
> Fixes: 633b388f85c5 ("media: camss: Refactor VFE HW version support")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Up the chain, vfe_reset can fail but the error isn't propagated

Konrad
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c
index c2487a8196db7..b6b425ac2e867 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-170.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c
@@ -562,9 +562,8 @@  static int vfe_enable(struct vfe_line *line)
  * vfe_disable - Disable streaming on VFE line
  * @line: VFE line
  *
- * Return 0 on success or a negative error code otherwise
  */
-static int vfe_disable(struct vfe_line *line)
+static void vfe_disable(struct vfe_line *line)
 {
 	struct vfe_device *vfe = to_vfe(line);
 
@@ -578,7 +577,7 @@  static int vfe_disable(struct vfe_line *line)
 
 	mutex_unlock(&vfe->stream_lock);
 
-	return 0;
+	return;
 }
 
 /*
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-480.c b/drivers/media/platform/qcom/camss/camss-vfe-480.c
index b1a07e846e25b..be00a713163e1 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-480.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-480.c
@@ -397,9 +397,8 @@  static int vfe_enable(struct vfe_line *line)
  * vfe_disable - Disable streaming on VFE line
  * @line: VFE line
  *
- * Return 0 on success or a negative error code otherwise
  */
-static int vfe_disable(struct vfe_line *line)
+static void vfe_disable(struct vfe_line *line)
 {
 	struct vfe_device *vfe = to_vfe(line);
 
@@ -413,7 +412,7 @@  static int vfe_disable(struct vfe_line *line)
 
 	mutex_unlock(&vfe->stream_lock);
 
-	return 0;
+	return;
 }
 
 /*
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen1.c b/drivers/media/platform/qcom/camss/camss-vfe-gen1.c
index 239d3d4ac6661..5e8319e565bbc 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-gen1.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-gen1.c
@@ -95,9 +95,8 @@  static int vfe_disable_output(struct vfe_line *line)
  * vfe_gen1_disable - Disable streaming on VFE line
  * @line: VFE line
  *
- * Return 0 on success or a negative error code otherwise
  */
-int vfe_gen1_disable(struct vfe_line *line)
+void vfe_gen1_disable(struct vfe_line *line)
 {
 	struct vfe_device *vfe = to_vfe(line);
 
@@ -114,7 +113,7 @@  int vfe_gen1_disable(struct vfe_line *line)
 
 	mutex_unlock(&vfe->stream_lock);
 
-	return 0;
+	return;
 }
 
 static void vfe_output_init_addrs(struct vfe_device *vfe,
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen1.h b/drivers/media/platform/qcom/camss/camss-vfe-gen1.h
index 6d5f9656562c8..b82137a2cb578 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-gen1.h
+++ b/drivers/media/platform/qcom/camss/camss-vfe-gen1.h
@@ -82,9 +82,8 @@  static inline u8 vfe_calc_interp_reso(u16 input, u16 output)
  * vfe_gen1_disable - Disable streaming on VFE line
  * @line: VFE line
  *
- * Return 0 on success or a negative error code otherwise
  */
-int vfe_gen1_disable(struct vfe_line *line);
+void vfe_gen1_disable(struct vfe_line *line);
 
 /*
  * vfe_gen1_enable - Enable VFE module
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 73380e75dbb22..d6c5628d51903 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -766,10 +766,7 @@  static int vfe_set_stream(struct v4l2_subdev *sd, int enable)
 			dev_err(vfe->camss->dev,
 				"Failed to enable vfe outputs\n");
 	} else {
-		ret = vfe->ops->vfe_disable(line);
-		if (ret < 0)
-			dev_err(vfe->camss->dev,
-				"Failed to disable vfe outputs\n");
+		vfe->ops->vfe_disable(line);
 	}
 
 	return ret;
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h
index cbc314c4e244b..b2f4192576364 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.h
+++ b/drivers/media/platform/qcom/camss/camss-vfe.h
@@ -112,7 +112,7 @@  struct vfe_hw_ops {
 	void (*reg_update_clear)(struct vfe_device *vfe,
 				 enum vfe_line_id line_id);
 	void (*subdev_init)(struct device *dev, struct vfe_device *vfe);
-	int (*vfe_disable)(struct vfe_line *line);
+	void (*vfe_disable)(struct vfe_line *line);
 	int (*vfe_enable)(struct vfe_line *line);
 	int (*vfe_halt)(struct vfe_device *vfe);
 	void (*violation_read)(struct vfe_device *vfe);