From: Neil Armstrong <neil.armstrong@linaro.org>
To: Artur Weber <aweber.kernel@gmail.com>,
Nathan Chancellor <nathan@kernel.org>
Cc: thierry.reding@gmail.com, Nikita Travkin <nikita@trvn.ru>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, "kernelci . org bot" <bot@kernelci.org>
Subject: Re: [PATCH v2] drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc struct
Date: Wed, 24 May 2023 11:41:08 +0200 [thread overview]
Message-ID: <d618bf50-816a-336d-6617-a0299cb59d61@linaro.org> (raw)
In-Reply-To: <20230524084324.11840-1-aweber.kernel@gmail.com>
On 24/05/2023 10:43, Artur Weber wrote:
> Fixes compilation issues with older GCC versions and Clang after
> changes introduced in commit 6810bb390282 ("drm/panel: Add Samsung
> S6D7AA0 panel controller driver"). Tested with GCC 13.1.1, GCC 6.4.0
> and Clang 16.0.3.
>
> Fixes the following errors with Clang:
>
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not a compile-time constant
> .drm_mode = s6d7aa0_lsl080al02_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not a compile-time constant
> .drm_mode = s6d7aa0_lsl080al03_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not a compile-time constant
> .drm_mode = s6d7aa0_ltl101at01_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> 3 errors generated.
>
> Fixes the following errors with GCC:
>
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not constant
> .drm_mode = s6d7aa0_lsl080al02_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: note: (near initialization for 's6d7aa0_lsl080al02_desc.drm_mode')
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not constant
> .drm_mode = s6d7aa0_lsl080al03_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: note: (near initialization for 's6d7aa0_lsl080al03_desc.drm_mode')
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not constant
> .drm_mode = s6d7aa0_ltl101at01_mode,
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: note: (near initialization for 's6d7aa0_ltl101at01_desc.drm_mode')
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Link: https://lore.kernel.org/lkml/20230523180212.GA1401867@dev-arch.thelio-3990X
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Link: https://lore.kernel.org/llvm/646c6def.a70a0220.58c1a.903d@mx.google.com
> Fixes: 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver")
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
> v2: expanded commit message
> ---
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> index f532aa018428..102e1fc7ee38 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> @@ -37,7 +37,7 @@ struct s6d7aa0_panel_desc {
> unsigned int panel_type;
> int (*init_func)(struct s6d7aa0 *ctx);
> int (*off_func)(struct s6d7aa0 *ctx);
> - const struct drm_display_mode drm_mode;
> + const struct drm_display_mode *drm_mode;
> unsigned long mode_flags;
> u32 bus_flags;
> bool has_backlight;
> @@ -309,7 +309,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al02_desc = {
> .panel_type = S6D7AA0_PANEL_LSL080AL02,
> .init_func = s6d7aa0_lsl080al02_init,
> .off_func = s6d7aa0_lsl080al02_off,
> - .drm_mode = s6d7aa0_lsl080al02_mode,
> + .drm_mode = &s6d7aa0_lsl080al02_mode,
> .mode_flags = MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP,
> .bus_flags = DRM_BUS_FLAG_DE_HIGH,
>
> @@ -412,7 +412,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = {
> .panel_type = S6D7AA0_PANEL_LSL080AL03,
> .init_func = s6d7aa0_lsl080al03_init,
> .off_func = s6d7aa0_lsl080al03_off,
> - .drm_mode = s6d7aa0_lsl080al03_mode,
> + .drm_mode = &s6d7aa0_lsl080al03_mode,
> .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET,
> .bus_flags = 0,
>
> @@ -440,7 +440,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = {
> .panel_type = S6D7AA0_PANEL_LTL101AT01,
> .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */
> .off_func = s6d7aa0_lsl080al03_off,
> - .drm_mode = s6d7aa0_ltl101at01_mode,
> + .drm_mode = &s6d7aa0_ltl101at01_mode,
> .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET,
> .bus_flags = 0,
>
> @@ -458,7 +458,7 @@ static int s6d7aa0_get_modes(struct drm_panel *panel,
> if (!ctx)
> return -EINVAL;
>
> - mode = drm_mode_duplicate(connector->dev, &ctx->desc->drm_mode);
> + mode = drm_mode_duplicate(connector->dev, ctx->desc->drm_mode);
> if (!mode)
> return -ENOMEM;
>
>
> base-commit: 37cee4876a45a5c3da79a83d34ed4f3c68548aef
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2023-05-24 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 8:43 Artur Weber
2023-05-24 9:41 ` Neil Armstrong [this message]
2023-05-24 9:48 ` Neil Armstrong
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=d618bf50-816a-336d-6617-a0299cb59d61@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=aweber.kernel@gmail.com \
--cc=bot@kernelci.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nikita@trvn.ru \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=trix@redhat.com \
/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
all inboxes | Powered by JetHome®