From: Randy Dunlap <rdunlap@infradead.org>
To: Douglas Anderson <dianders@chromium.org>,
dri-devel@lists.freedesktop.org
Cc: 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>,
Sam Ravnborg <sam@ravnborg.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 08:23:54 -0700 [thread overview]
Message-ID: <fe48df3f-a6ec-d787-4672-254c8bd4c313@infradead.org> (raw)
In-Reply-To: <20210924075317.1.I1e58d74d501613f1fe7585958f451160d11b8a98@changeid>
On 9/24/21 7:53 AM, 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>
> ---
>
> drivers/gpu/drm/drm_edid.c | 121 +++++++++++++++---------------
> drivers/gpu/drm/panel/panel-edp.c | 23 +++---
> include/drm/drm_edid.h | 14 ++--
> 3 files changed, 81 insertions(+), 77 deletions(-)
>
Works for me. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
--
~Randy
next prev parent reply other threads:[~2021-09-24 15:24 UTC|newest]
Thread overview: 3+ 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 [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=fe48df3f-a6ec-d787-4672-254c8bd4c313@infradead.org \
--to=rdunlap@infradead.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=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).