Re: Build failure with GCC 15 in drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
Ville Syrjälä <[email protected]> Tue, 1 Oct 2024 17:12:48 +0300
| Newsgroups | gmane.linux.newbie |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected]
>
> --- 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