From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/i915: cleanup unused returns on DP-MST
Date: Fri, 11 Oct 2019 14:48:12 +0300 [thread overview]
Message-ID: <20191011114812.GJ1208@intel.com> (raw)
In-Reply-To: <20191011010907.103309-3-lucas.demarchi@intel.com>
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@intel.com>
> ---
> 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?
> +
> + 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-11 11:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 1:09 [PATCH 0/7] Small fixes before fixing MST Lucas De Marchi
2019-10-11 1:09 ` [PATCH 1/7] drm/i915: simplify setting of ddi_io_power_domain Lucas De Marchi
2019-10-11 18:01 ` Souza, Jose
2019-10-11 1:09 ` [PATCH 2/7] drm/i915: cleanup unused returns on DP-MST Lucas De Marchi
2019-10-11 11:48 ` Ville Syrjälä [this message]
2019-10-14 18:04 ` Lucas De Marchi
2019-10-11 1:09 ` [PATCH 3/7] drm/i915: fix port checks for MST support on gen >= 11 Lucas De Marchi
2019-10-11 12:02 ` Ville Syrjälä
2019-10-11 1:09 ` [PATCH 4/7] drm/i915: remove extra new line on pipe_config mismatch Lucas De Marchi
2019-10-11 12:05 ` Ville Syrjälä
2019-10-11 1:09 ` [PATCH 5/7] drm/i915: add pipe name to pipe mismatch logs Lucas De Marchi
2019-10-11 12:05 ` Ville Syrjälä
2019-10-11 1:09 ` [PATCH 6/7] drm/i915: prettify MST debug message Lucas De Marchi
2019-10-11 12:08 ` Ville Syrjälä
2019-10-11 17:08 ` Lucas De Marchi
2019-10-11 17:14 ` Ville Syrjälä
2019-10-11 17:22 ` Lucas De Marchi
2019-10-11 1:09 ` [PATCH 7/7] drm/dp-mst: fix warning on unused var Lucas De Marchi
2019-10-11 17:58 ` Lucas De Marchi
2019-10-14 17:47 ` Daniel Vetter
2019-10-11 18:03 ` Souza, Jose
2019-10-11 1:45 ` ✗ Fi.CI.CHECKPATCH: warning for Small fixes before fixing MST Patchwork
2019-10-11 1:47 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-10-11 2:05 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-11 14:26 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011114812.GJ1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.