[drm:i915-vtable-cleanup 12/12] drivers/gpu/drm/i915/display/intel_audio.c:852:24: error: member reference type 'const struct drm_i915_display_audio_funcs *' is a pointer; did you mean to use '->'?

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

 



tree:   git://people.freedesktop.org/~airlied/linux.git i915-vtable-cleanup
head:   b0d0061aeef594fc572295c0e3c02ba91596cbf6
commit: b0d0061aeef594fc572295c0e3c02ba91596cbf6 [12/12] drm/i915/display: constify the audio functions
config: x86_64-randconfig-a016-20210906 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9c476172b93367d2cb88d7d3f4b1b5b456fa6020)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add drm git://people.freedesktop.org/~airlied/linux.git
        git fetch --no-tags drm i915-vtable-cleanup
        git checkout b0d0061aeef594fc572295c0e3c02ba91596cbf6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_audio.c:852:24: error: member reference type 'const struct drm_i915_display_audio_funcs *' is a pointer; did you mean to use '->'?
                   dev_priv->audio_funcs.audio_codec_enable(encoder,
                   ~~~~~~~~~~~~~~~~~~~~~^
                                        ->
   drivers/gpu/drm/i915/display/intel_audio.c:897:24: error: member reference type 'const struct drm_i915_display_audio_funcs *' is a pointer; did you mean to use '->'?
                   dev_priv->audio_funcs.audio_codec_disable(encoder,
                   ~~~~~~~~~~~~~~~~~~~~~^
                                        ->
>> drivers/gpu/drm/i915/display/intel_audio.c:919:46: error: expected '}'
           .audio_codec_enable = g4x_audio_codec_enable;
                                                       ^
   drivers/gpu/drm/i915/display/intel_audio.c:918:68: note: to match this '{'
   static const struct drm_i915_display_audio_funcs g4x_audio_funcs = {
                                                                      ^
>> drivers/gpu/drm/i915/display/intel_audio.c:920:2: error: expected identifier or '('
           .audio_codec_disable = g4x_audio_codec_disable;
           ^
>> drivers/gpu/drm/i915/display/intel_audio.c:921:1: error: extraneous closing brace ('}')
   };
   ^
   drivers/gpu/drm/i915/display/intel_audio.c:924:46: error: expected '}'
           .audio_codec_enable = ilk_audio_codec_enable;
                                                       ^
   drivers/gpu/drm/i915/display/intel_audio.c:923:68: note: to match this '{'
   static const struct drm_i915_display_audio_funcs ilk_audio_funcs = {
                                                                      ^
   drivers/gpu/drm/i915/display/intel_audio.c:925:2: error: expected identifier or '('
           .audio_codec_disable = ilk_audio_codec_disable;
           ^
   drivers/gpu/drm/i915/display/intel_audio.c:926:1: error: extraneous closing brace ('}')
   };
   ^
   drivers/gpu/drm/i915/display/intel_audio.c:929:46: error: expected '}'
           .audio_codec_enable = hsw_audio_codec_enable;
                                                       ^
   drivers/gpu/drm/i915/display/intel_audio.c:928:68: note: to match this '{'
   static const struct drm_i915_display_audio_funcs hsw_audio_funcs = {
                                                                      ^
   drivers/gpu/drm/i915/display/intel_audio.c:930:2: error: expected identifier or '('
           .audio_codec_disable = hsw_audio_codec_disable;
           ^
   drivers/gpu/drm/i915/display/intel_audio.c:931:1: error: extraneous closing brace ('}')
   };
   ^
   11 errors generated.


vim +852 drivers/gpu/drm/i915/display/intel_audio.c

7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  814  
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  815  /**
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  816   * intel_audio_codec_enable - Enable the audio codec for HD audio
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  817   * @encoder: encoder on which to enable audio
bbf35e9defb9a6 drivers/gpu/drm/i915/intel_audio.c         Maarten Lankhorst    2016-11-08  818   * @crtc_state: pointer to the current crtc state.
bbf35e9defb9a6 drivers/gpu/drm/i915/intel_audio.c         Maarten Lankhorst    2016-11-08  819   * @conn_state: pointer to the current connector state.
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  820   *
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  821   * The enable sequences may only be performed after enabling the transcoder and
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  822   * port, and after completed link training.
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  823   */
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  824  void intel_audio_codec_enable(struct intel_encoder *encoder,
bbf35e9defb9a6 drivers/gpu/drm/i915/intel_audio.c         Maarten Lankhorst    2016-11-08  825  			      const struct intel_crtc_state *crtc_state,
bbf35e9defb9a6 drivers/gpu/drm/i915/intel_audio.c         Maarten Lankhorst    2016-11-08  826  			      const struct drm_connector_state *conn_state)
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  827  {
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  828  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
51e1d83cab9988 drivers/gpu/drm/i915/intel_audio.c         David Henningsson    2015-08-19  829  	struct i915_audio_component *acomp = dev_priv->audio_component;
2225f3c6f1d793 drivers/gpu/drm/i915/display/intel_audio.c Maarten Lankhorst    2019-10-31  830  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  831  	struct drm_connector *connector = conn_state->connector;
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  832  	const struct drm_display_mode *adjusted_mode =
1326a92c346641 drivers/gpu/drm/i915/display/intel_audio.c Maarten Lankhorst    2019-10-31  833  		&crtc_state->hw.adjusted_mode;
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  834  	enum port port = encoder->port;
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  835  	enum pipe pipe = crtc->pipe;
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  836  
abf4b8ed42e9dc drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2019-04-30  837  	/* FIXME precompute the ELD in .compute_config() */
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  838  	if (!connector->eld[0])
6385514932d5fc drivers/gpu/drm/i915/display/intel_audio.c Wambui Karuga        2020-01-21  839  		drm_dbg_kms(&dev_priv->drm,
6385514932d5fc drivers/gpu/drm/i915/display/intel_audio.c Wambui Karuga        2020-01-21  840  			    "Bogus ELD on [CONNECTOR:%d:%s]\n",
abf4b8ed42e9dc drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2019-04-30  841  			    connector->base.id, connector->name);
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  842  
6385514932d5fc drivers/gpu/drm/i915/display/intel_audio.c Wambui Karuga        2020-01-21  843  	drm_dbg(&dev_priv->drm, "ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  844  		connector->base.id,
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  845  		connector->name,
79003e61b1fbfd drivers/gpu/drm/i915/display/intel_audio.c Ville Syrjälä        2019-12-04  846  		encoder->base.base.id,
79003e61b1fbfd drivers/gpu/drm/i915/display/intel_audio.c Ville Syrjälä        2019-12-04  847  		encoder->base.name);
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  848  
124abe076fd8b3 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2015-09-08  849  	connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  850  
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08  851  	if (dev_priv->audio_funcs)
9c1ce0dbf2c66b drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08 @852  		dev_priv->audio_funcs.audio_codec_enable(encoder,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  853  						     crtc_state,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  854  						     conn_state);
51e1d83cab9988 drivers/gpu/drm/i915/intel_audio.c         David Henningsson    2015-08-19  855  
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  856  	mutex_lock(&dev_priv->av_mutex);
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  857  	encoder->audio_connector = connector;
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  858  
9dfbffcf4ac070 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2016-02-24  859  	/* referred in audio callbacks */
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  860  	dev_priv->av_enc_map[pipe] = encoder;
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  861  	mutex_unlock(&dev_priv->av_mutex);
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  862  
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  863  	if (acomp && acomp->base.audio_ops &&
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  864  	    acomp->base.audio_ops->pin_eld_notify) {
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  865  		/* audio drivers expect pipe = -1 to indicate Non-MST cases */
9f846643c788bb drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  866  		if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  867  			pipe = -1;
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  868  		acomp->base.audio_ops->pin_eld_notify(acomp->base.audio_ops->audio_ptr,
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  869  						 (int) port, (int) pipe);
9c9191f3de5926 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2017-01-31  870  	}
9c9191f3de5926 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2017-01-31  871  
20be551e6d0a59 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-04-27  872  	intel_lpe_audio_notify(dev_priv, pipe, port, connector->eld,
b5f2be9ae5bf88 drivers/gpu/drm/i915/intel_audio.c         Pierre-Louis Bossart 2017-01-31  873  			       crtc_state->port_clock,
9f846643c788bb drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  874  			       intel_crtc_has_dp_encoder(crtc_state));
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  875  }
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  876  
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  877  /**
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  878   * intel_audio_codec_disable - Disable the audio codec for HD audio
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  879   * @encoder: encoder on which to disable audio
764b9f2c4d252f drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-11-14  880   * @old_crtc_state: pointer to the old crtc state.
764b9f2c4d252f drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-11-14  881   * @old_conn_state: pointer to the old connector state.
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  882   *
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  883   * The disable sequences must be performed before disabling the transcoder or
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  884   * port.
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  885   */
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  886  void intel_audio_codec_disable(struct intel_encoder *encoder,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  887  			       const struct intel_crtc_state *old_crtc_state,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  888  			       const struct drm_connector_state *old_conn_state)
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  889  {
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  890  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
51e1d83cab9988 drivers/gpu/drm/i915/intel_audio.c         David Henningsson    2015-08-19  891  	struct i915_audio_component *acomp = dev_priv->audio_component;
2225f3c6f1d793 drivers/gpu/drm/i915/display/intel_audio.c Maarten Lankhorst    2019-10-31  892  	struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  893  	enum port port = encoder->port;
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  894  	enum pipe pipe = crtc->pipe;
69bfe1a9b4dffc drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  895  
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08  896  	if (dev_priv->audio_funcs)
9c1ce0dbf2c66b drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08  897  		dev_priv->audio_funcs.audio_codec_disable(encoder,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  898  						      old_crtc_state,
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  899  						      old_conn_state);
51e1d83cab9988 drivers/gpu/drm/i915/intel_audio.c         David Henningsson    2015-08-19  900  
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  901  	mutex_lock(&dev_priv->av_mutex);
8ec47de21bfab9 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  902  	encoder->audio_connector = NULL;
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  903  	dev_priv->av_enc_map[pipe] = NULL;
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  904  	mutex_unlock(&dev_priv->av_mutex);
cae666ceb8c3f1 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2015-11-12  905  
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  906  	if (acomp && acomp->base.audio_ops &&
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  907  	    acomp->base.audio_ops->pin_eld_notify) {
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  908  		/* audio drivers expect pipe = -1 to indicate Non-MST cases */
9f846643c788bb drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-10-30  909  		if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST))
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  910  			pipe = -1;
ae891abe7c2ccf drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2018-07-11  911  		acomp->base.audio_ops->pin_eld_notify(acomp->base.audio_ops->audio_ptr,
f931894194b939 drivers/gpu/drm/i915/intel_audio.c         Pandiyan, Dhinakaran 2016-09-21  912  						 (int) port, (int) pipe);
9c9191f3de5926 drivers/gpu/drm/i915/intel_audio.c         Takashi Iwai         2017-01-31  913  	}
46d196ec460b9c drivers/gpu/drm/i915/intel_audio.c         Jerome Anand         2017-01-25  914  
20be551e6d0a59 drivers/gpu/drm/i915/intel_audio.c         Ville Syrjälä        2017-04-27  915  	intel_lpe_audio_notify(dev_priv, pipe, port, NULL, 0, false);
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  916  }
7c10a2b5876e01 drivers/gpu/drm/i915/intel_audio.c         Jani Nikula          2014-10-27  917  
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08  918  static const struct drm_i915_display_audio_funcs g4x_audio_funcs = {
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08 @919  	.audio_codec_enable = g4x_audio_codec_enable;
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08 @920  	.audio_codec_disable = g4x_audio_codec_disable;
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08 @921  };
b0d0061aeef594 drivers/gpu/drm/i915/display/intel_audio.c Dave Airlie          2021-09-08  922  

:::::: The code at line 852 was first introduced by commit
:::::: 9c1ce0dbf2c66b4038b09b712764ccdb272c03f6 drm/i915/display: split out display related audio funcs.

:::::: TO: Dave Airlie <airlied@xxxxxxxxxx>
:::::: CC: Dave Airlie <airlied@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux