From: Sam Ravnborg <sam@ravnborg.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: dri-devel@lists.freedesktop.org, a.hajda@samsung.com,
smyakam@microsoft.com, jani.nikula@linux.intel.com,
linus.walleij@linaro.org, stanislav.lisovskiy@intel.com,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Jani Nikula <jani.nikula@intel.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/edid: Fix EDID quirk compile error on older compilers
Date: Fri, 24 Sep 2021 19:10:19 +0200 [thread overview]
Message-ID: <YU4Ge0vpwaibXEY2@ravnborg.org> (raw)
In-Reply-To: <20210924075317.1.I1e58d74d501613f1fe7585958f451160d11b8a98@changeid>
On Fri, Sep 24, 2021 at 07:53:21AM -0700, Douglas Anderson wrote:
> Apparently some compilers [1] cannot handle doing math on dereferenced
> string constants at compile time. This has led to reports [2] of
> compile errors like:
>
> In file included from drivers/gpu/drm/drm_edid.c:42:0:
> ./include/drm/drm_edid.h:525:2: error: initializer element is not constant
> ((((u32)((vend)[0]) - '@') & 0x1f) << 26 | \
>
> Go back to the syntax I used in v4 of the patch series [3] that added
> this code instead of what landed (v5). This syntax is slightly uglier
> but should be much more compatible with varied compilers.
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69960#c18
> [2] https://lore.kernel.org/r/874kaabdt5.fsf@intel.com/
> [3] https://lore.kernel.org/r/20210909135838.v4.4.I6103ce2b16e5e5a842b14c7022a034712b434609@changeid/
>
> Fixes: d9f91a10c3e8 ("drm/edid: Allow querying/working with the panel ID from the EDID")
> Reported-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Reported-by: Srikanth Myakam <smyakam@microsoft.com>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Not so nice, but apparently needed.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
next prev parent reply other threads:[~2021-09-24 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 14:53 [PATCH] drm/edid: Fix EDID quirk compile error on older compilers Douglas Anderson
2021-09-24 15:23 ` Randy Dunlap
2021-09-24 17:10 ` Sam Ravnborg [this message]
2021-09-24 21:58 ` Doug Anderson
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=YU4Ge0vpwaibXEY2@ravnborg.org \
--to=sam@ravnborg.org \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jani.nikula@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=smyakam@microsoft.com \
--cc=stanislav.lisovskiy@intel.com \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox