LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] gpu: drm: i915: intel_display.c:  Remove unused function
@ 2014-12-07 18:29 Rickard Strandqvist
  2014-12-08  8:42 ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Rickard Strandqvist @ 2014-12-07 18:29 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula
  Cc: Rickard Strandqvist, David Airlie, intel-gfx, dri-devel, linux-kernel

Remove the function intel_output_name() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/gpu/drm/i915/intel_display.c |   22 ----------------------
 drivers/gpu/drm/i915/intel_drv.h     |    1 -
 2 files changed, 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f0a1a56..14c47cf 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12258,28 +12258,6 @@ static bool has_edp_a(struct drm_device *dev)
 	return true;
 }
 
-const char *intel_output_name(int output)
-{
-	static const char *names[] = {
-		[INTEL_OUTPUT_UNUSED] = "Unused",
-		[INTEL_OUTPUT_ANALOG] = "Analog",
-		[INTEL_OUTPUT_DVO] = "DVO",
-		[INTEL_OUTPUT_SDVO] = "SDVO",
-		[INTEL_OUTPUT_LVDS] = "LVDS",
-		[INTEL_OUTPUT_TVOUT] = "TV",
-		[INTEL_OUTPUT_HDMI] = "HDMI",
-		[INTEL_OUTPUT_DISPLAYPORT] = "DisplayPort",
-		[INTEL_OUTPUT_EDP] = "eDP",
-		[INTEL_OUTPUT_DSI] = "DSI",
-		[INTEL_OUTPUT_UNKNOWN] = "Unknown",
-	};
-
-	if (output < 0 || output >= ARRAY_SIZE(names) || !names[output])
-		return "Invalid";
-
-	return names[output];
-}
-
 static bool intel_crt_present(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ba71522..7dde496 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -793,7 +793,6 @@ void intel_ddi_clock_get(struct intel_encoder *encoder,
 void intel_ddi_set_vc_payload_alloc(struct drm_crtc *crtc, bool state);
 
 /* intel_display.c */
-const char *intel_output_name(int output);
 bool intel_has_pending_fb_unpin(struct drm_device *dev);
 int intel_pch_rawclk(struct drm_device *dev);
 void intel_mark_busy(struct drm_device *dev);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpu: drm: i915: intel_display.c:  Remove unused function
  2014-12-07 18:29 [PATCH] gpu: drm: i915: intel_display.c: Remove unused function Rickard Strandqvist
@ 2014-12-08  8:42 ` Daniel Vetter
  2014-12-08 12:32   ` [Intel-gfx] " Paulo Zanoni
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-12-08  8:42 UTC (permalink / raw)
  To: Rickard Strandqvist
  Cc: Daniel Vetter, Jani Nikula, intel-gfx, linux-kernel, dri-devel

On Sun, Dec 07, 2014 at 07:29:17PM +0100, Rickard Strandqvist wrote:
> Remove the function intel_output_name() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

Queued for 3.20, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] gpu: drm: i915: intel_display.c: Remove unused function
  2014-12-08  8:42 ` Daniel Vetter
@ 2014-12-08 12:32   ` Paulo Zanoni
  2014-12-08 14:17     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Paulo Zanoni @ 2014-12-08 12:32 UTC (permalink / raw)
  To: Rickard Strandqvist, Daniel Vetter, Jani Nikula,
	Intel Graphics Development, linux-kernel, DRI Development,
	Damien Lespiau

2014-12-08 6:42 GMT-02:00 Daniel Vetter <daniel@ffwll.ch>:
> On Sun, Dec 07, 2014 at 07:29:17PM +0100, Rickard Strandqvist wrote:
>> Remove the function intel_output_name() that is not used anywhere.
>>
>> This was partially found by using a static code analysis program called cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Queued for 3.20, thanks for the patch.

This function was created for the "DDI personality" patches. We merged
the function but never ended up merging the patch containing the
callers...

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] gpu: drm: i915: intel_display.c: Remove unused function
  2014-12-08 12:32   ` [Intel-gfx] " Paulo Zanoni
@ 2014-12-08 14:17     ` Daniel Vetter
  2014-12-08 16:18       ` Paulo Zanoni
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-12-08 14:17 UTC (permalink / raw)
  To: Paulo Zanoni
  Cc: Rickard Strandqvist, Daniel Vetter, Jani Nikula,
	Intel Graphics Development, linux-kernel, DRI Development,
	Damien Lespiau

On Mon, Dec 08, 2014 at 10:32:49AM -0200, Paulo Zanoni wrote:
> 2014-12-08 6:42 GMT-02:00 Daniel Vetter <daniel@ffwll.ch>:
> > On Sun, Dec 07, 2014 at 07:29:17PM +0100, Rickard Strandqvist wrote:
> >> Remove the function intel_output_name() that is not used anywhere.
> >>
> >> This was partially found by using a static code analysis program called cppcheck.
> >>
> >> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> >
> > Queued for 3.20, thanks for the patch.
> 
> This function was created for the "DDI personality" patches. We merged
> the function but never ended up merging the patch containing the
> callers...

Oops, I've thought this is a renmant from the very first days of kms that
somehow stuck around. That's what I get for once not using git blame
excessively :( Want me to drop the patch again?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] gpu: drm: i915: intel_display.c: Remove unused function
  2014-12-08 14:17     ` Daniel Vetter
@ 2014-12-08 16:18       ` Paulo Zanoni
  0 siblings, 0 replies; 5+ messages in thread
From: Paulo Zanoni @ 2014-12-08 16:18 UTC (permalink / raw)
  To: Paulo Zanoni, Rickard Strandqvist, Daniel Vetter, Jani Nikula,
	Intel Graphics Development, linux-kernel, DRI Development,
	Damien Lespiau

2014-12-08 12:17 GMT-02:00 Daniel Vetter <daniel@ffwll.ch>:
> On Mon, Dec 08, 2014 at 10:32:49AM -0200, Paulo Zanoni wrote:
>> 2014-12-08 6:42 GMT-02:00 Daniel Vetter <daniel@ffwll.ch>:
>> > On Sun, Dec 07, 2014 at 07:29:17PM +0100, Rickard Strandqvist wrote:
>> >> Remove the function intel_output_name() that is not used anywhere.
>> >>
>> >> This was partially found by using a static code analysis program called cppcheck.
>> >>
>> >> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>> >
>> > Queued for 3.20, thanks for the patch.
>>
>> This function was created for the "DDI personality" patches. We merged
>> the function but never ended up merging the patch containing the
>> callers...
>
> Oops, I've thought this is a renmant from the very first days of kms that
> somehow stuck around. That's what I get for once not using git blame
> excessively :( Want me to drop the patch again?

I am not opposed to the removal of an unused function: I understand
the value in the removal, and I also understand the reasons to keep
it. I was just pointing the reason of why we got here: we merged patch
1/2 but ended up never merging patch 2/2 because we always spot some
additional work required and it's a very low priority bug. If this
function is removed, the next person to try to ressurrect the ddi
personality patch can quickly resurrect it or even write a new
implementation from scratch. It is your decision :)


> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Paulo Zanoni

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-08 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-07 18:29 [PATCH] gpu: drm: i915: intel_display.c: Remove unused function Rickard Strandqvist
2014-12-08  8:42 ` Daniel Vetter
2014-12-08 12:32   ` [Intel-gfx] " Paulo Zanoni
2014-12-08 14:17     ` Daniel Vetter
2014-12-08 16:18       ` Paulo Zanoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).