All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "kbuild test robot" <fengguang.wu@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, kbuild-all@01.org
Subject: Re: [drm-intel:for-linux-next 746/778] drivers/gpu/drm/i915/intel_audio.c:405:45: sparse: incorrect type in argument 2 (different modifiers)
Date: Wed, 30 Sep 2015 10:45:00 +0300	[thread overview]
Message-ID: <87vbascpvn.fsf@intel.com> (raw)
In-Reply-To: <201509300227.CWF5rss4%fengguang.wu@intel.com>


These are fixed already, see below for references.

BR,
Jani.

On Tue, 29 Sep 2015, kbuild test robot <fengguang.wu@intel.com> wrote:
> tree:   git://anongit.freedesktop.org/drm-intel for-linux-next
> head:   22f146cd928e834c7eec724b6816e24cc29b59fb
> commit: 67d92bb51cff3596b0ee660eef26f5c7017e3509 [746/778] drm/i915: Constify adjusted_mode
> reproduce:
>   # apt-get install sparse
>   git checkout 67d92bb51cff3596b0ee660eef26f5c7017e3509
>   make ARCH=x86_64 allmodconfig
>   make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> drivers/gpu/drm/i915/intel_audio.c:405:45: sparse: incorrect type in argument 2 (different modifiers)
>    drivers/gpu/drm/i915/intel_audio.c:405:45:    expected struct drm_display_mode *mode
>    drivers/gpu/drm/i915/intel_audio.c:405:45:    got struct drm_display_mode const *adjusted_mode
>    drivers/gpu/drm/i915/intel_audio.c:420:58: sparse: incorrect type in argument 2 (different modifiers)
>    drivers/gpu/drm/i915/intel_audio.c:420:58:    expected struct drm_display_mode *mode
>    drivers/gpu/drm/i915/intel_audio.c:420:58:    got struct drm_display_mode const *adjusted_mode
>    drivers/gpu/drm/i915/intel_audio.c: In function 'intel_audio_codec_enable':
>    drivers/gpu/drm/i915/intel_audio.c:405:38: warning: passing argument 2 of 'drm_select_eld' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>      connector = drm_select_eld(encoder, adjusted_mode);
>                                          ^
>    In file included from drivers/gpu/drm/i915/intel_audio.c:30:0:
>    include/drm/drm_edid.h:330:23: note: expected 'struct drm_display_mode *' but argument is of type 'const struct drm_display_mode *'
>     struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
>                           ^

commit 9e5a3b529e8419db1dd2b32c86a1fb42fc07347d
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Sep 7 18:22:57 2015 +0300

    drm: Remove the 'mode' argument from drm_select_eld()

>    drivers/gpu/drm/i915/intel_audio.c:420:51: warning: passing argument 2 of 'drm_av_sync_delay' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>      connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
>                                                       ^
>    In file included from drivers/gpu/drm/i915/intel_audio.c:30:0:
>    include/drm/drm_edid.h:328:5: note: expected 'struct drm_display_mode *' but argument is of type 'const struct drm_display_mode *'
>     int drm_av_sync_delay(struct drm_connector *connector,
>         ^

commit 3a818d350f6b5ad542175ab1f71c027787ce952e
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Sep 7 18:22:58 2015 +0300

    drm: Make drm_av_sync_delay() 'mode' argument const

>
> vim +405 drivers/gpu/drm/i915/intel_audio.c
>
> 69bfe1a9b Jani Nikula   2014-10-27  389  /**
> 69bfe1a9b Jani Nikula   2014-10-27  390   * intel_audio_codec_enable - Enable the audio codec for HD audio
> 69bfe1a9b Jani Nikula   2014-10-27  391   * @intel_encoder: encoder on which to enable audio
> 69bfe1a9b Jani Nikula   2014-10-27  392   *
> 69bfe1a9b Jani Nikula   2014-10-27  393   * The enable sequences may only be performed after enabling the transcoder and
> 69bfe1a9b Jani Nikula   2014-10-27  394   * port, and after completed link training.
> 69bfe1a9b Jani Nikula   2014-10-27  395   */
> 69bfe1a9b Jani Nikula   2014-10-27  396  void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
> 7c10a2b58 Jani Nikula   2014-10-27  397  {
> 33d1e7c6f Jani Nikula   2014-10-27  398  	struct drm_encoder *encoder = &intel_encoder->base;
> 33d1e7c6f Jani Nikula   2014-10-27  399  	struct intel_crtc *crtc = to_intel_crtc(encoder->crtc);
> 67d92bb51 Ville Syrjälä 2015-09-08  400  	const struct drm_display_mode *adjusted_mode = &crtc->config->base.adjusted_mode;
> 7c10a2b58 Jani Nikula   2014-10-27  401  	struct drm_connector *connector;
> 7c10a2b58 Jani Nikula   2014-10-27  402  	struct drm_device *dev = encoder->dev;
> 7c10a2b58 Jani Nikula   2014-10-27  403  	struct drm_i915_private *dev_priv = dev->dev_private;
> 7c10a2b58 Jani Nikula   2014-10-27  404  
> b8abe859c Ville Syrjälä 2015-09-08 @405  	connector = drm_select_eld(encoder, adjusted_mode);
> 7c10a2b58 Jani Nikula   2014-10-27  406  	if (!connector)
> 7c10a2b58 Jani Nikula   2014-10-27  407  		return;
> 7c10a2b58 Jani Nikula   2014-10-27  408  
> 7c10a2b58 Jani Nikula   2014-10-27  409  	DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
> 7c10a2b58 Jani Nikula   2014-10-27  410  			 connector->base.id,
> 7c10a2b58 Jani Nikula   2014-10-27  411  			 connector->name,
> 7c10a2b58 Jani Nikula   2014-10-27  412  			 connector->encoder->base.id,
> 7c10a2b58 Jani Nikula   2014-10-27  413  			 connector->encoder->name);
>
> :::::: The code at line 405 was first introduced by commit
> :::::: b8abe859c9d61101100cf9d87fe56defd668e42a drm/i915: Always call the adjusted mode 'adjusted_mode'
>
> :::::: TO: Ville Syrjälä <ville.syrjala@linux.intel.com>
> :::::: CC: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-09-30  7:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 18:46 [drm-intel:for-linux-next 746/778] drivers/gpu/drm/i915/intel_audio.c:405:45: sparse: incorrect type in argument 2 (different modifiers) kbuild test robot
2015-09-30  7:45 ` Jani Nikula [this message]
2015-09-30  8:16   ` Daniel Vetter

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=87vbascpvn.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=fengguang.wu@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    --cc=ville.syrjala@linux.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.