Re: Build failure with GCC 15 in drivers/gpu/drm/display/drm_dp_dual_mode_helper.c

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

 



On Tue, Oct 01, 2024 at 07:36:17PM +0530, Brahmajit wrote:
> On 01.10.2024 17:02, Ville Syrjälä wrote:
> > > -static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN])
> > > +static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN+1])
> > 
> > This should not have the +1
> > 
> > >  {
> > > -	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] =
> > > +	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN+1] =
> > >  		"DP-HDMI ADAPTOR\x04";
> > >  
> > >  	return memcmp(hdmi_id, dp_dual_mode_hdmi_id,
> > > -		      sizeof(dp_dual_mode_hdmi_id)) == 0;
> > > +		      DP_DUAL_MODE_HDMI_ID_LEN+1) == 0;
> > 
> > and neither should this
> > 
> > >  }
> 
> Does this look good?

Aye. Please add the small comment I mentioned, and post
to dri-devel@xxxxxxxxxxxxxxxxxxxxx

> 
> --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> @@ -160,11 +160,11 @@ EXPORT_SYMBOL(drm_dp_dual_mode_write);
>  
>  static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN])
>  {
> -	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] =
> +	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN + 1] =
>  		"DP-HDMI ADAPTOR\x04";
>  
>  	return memcmp(hdmi_id, dp_dual_mode_hdmi_id,
> -		      sizeof(dp_dual_mode_hdmi_id)) == 0;
> +		      DP_DUAL_MODE_HDMI_ID_LEN) == 0;
>  }
>  
>  static bool is_type1_adaptor(uint8_t adaptor_id)
> -- 
> Regards,
> Brahmajit

-- 
Ville Syrjälä
Intel




[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux