Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1236383

[PATCH] drm/i915: fix compiler warnings in intel_audio.c

From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject [PATCH] drm/i915: fix compiler warnings in intel_audio.c
Date 2015-09-30 16:30 +0200
Message-ID <qeqym-7BV-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Fix the following warnings:

  CC      drivers/gpu/drm/i915/intel_audio.o
drivers/gpu/drm/i915/intel_audio.c: In function ‘hsw_audio_codec_enable’:
drivers/gpu/drm/i915/intel_audio.c:332:39: warning: passing argument 2 of ‘audio_rate_need_prog’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  if (audio_rate_need_prog(intel_crtc, adjusted_mode)) {
                                       ^
drivers/gpu/drm/i915/intel_audio.c:147:13: note: expected ‘struct drm_display_mode *’ but argument is of type ‘const struct drm_display_mode *’
 static bool audio_rate_need_prog(struct intel_crtc *crtc,
             ^

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index baadd90..72d696b 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -145,7 +145,7 @@ static uint32_t audio_config_setup_n_reg(int n, uint32_t val)
 
 /* check whether N/CTS/M need be set manually */
 static bool audio_rate_need_prog(struct intel_crtc *crtc,
-					struct drm_display_mode *mode)
+				 const struct drm_display_mode *mode)
 {
 	if (((mode->clock == TMDS_297M) ||
 		 (mode->clock == TMDS_296M)) &&
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] drm/i915: fix compiler warnings in intel_audio.c Geliang Tang <geliangtang@163.com> - 2015-09-30 16:30 +0200
  Re: [PATCH] drm/i915: fix compiler warnings in intel_audio.c Jani Nikula <jani.nikula@linux.intel.com> - 2015-09-30 16:40 +0200

csiph-web