Re: [PATCH 2/7] drm/i915: cleanup unused returns on DP-MST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2019 at 02:48:12PM +0300, Ville Syrjälä wrote:
On Thu, Oct 10, 2019 at 06:09:02PM -0700, Lucas De Marchi wrote:
Those init functions mark their success in the intel_dig_port
struct, the return values are not really used.

Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 11 +++++------
 drivers/gpu/drm/i915/display/intel_dp_mst.h |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 2203be28ea01..c2bbba1effc1 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -634,7 +634,7 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum

 }

-static bool
+static void
 intel_dp_create_fake_mst_encoders(struct intel_digital_port *intel_dig_port)
 {
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
@@ -643,7 +643,6 @@ intel_dp_create_fake_mst_encoders(struct intel_digital_port *intel_dig_port)

 	for_each_pipe(dev_priv, pipe)
 		intel_dp->mst_encoders[pipe] = intel_dp_create_fake_mst_encoder(intel_dig_port, pipe);
-	return true;
 }

 int
@@ -652,14 +651,13 @@ intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port)
 	return intel_dig_port->dp.active_mst_links;
 }

-int
+void
 intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_base_id)
 {
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
 	struct drm_device *dev = intel_dig_port->base.base.dev;
 	int ret;

-	intel_dp->can_mst = true;
 	intel_dp->mst_mgr.cbs = &mst_cbs;

 	/* create encoders */
@@ -668,9 +666,10 @@ intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_ba
 					   &intel_dp->aux, 16, 3, conn_base_id);
 	if (ret) {
 		intel_dp->can_mst = false;
-		return ret;
+		return;
 	}
-	return 0;

I don't really like the silent failure mode. Maybe we should just fail
the entire connector init when this happens?

ok. For now I will just drop this patch.

Lucas De Marchi


+
+	intel_dp->can_mst = true;
 }

 void
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
index f660ad80db04..f2478c17a8fd 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@ -8,7 +8,7 @@

 struct intel_digital_port;

-int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
+void intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
 void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port);
 int intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port);

--
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux