From: Borislav Petkov <bp@alien8.de>
To: "Lazar, Lijo" <lijo.lazar@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>,
Alex Deucher <alexander.deucher@amd.com>,
Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export
Date: Tue, 24 Aug 2021 16:37:22 +0200 [thread overview]
Message-ID: <YSUEIriLpcQQYy2k@zn.tnic> (raw)
In-Reply-To: <1bb0baef-7924-98ab-b125-aa3c2ac405d4@amd.com>
On Tue, Aug 24, 2021 at 07:22:46PM +0530, Lazar, Lijo wrote:
> 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP
> is set/enabled.
pm_suspend_target_state is available only when CONFIG_SUSPEND is
enabled. The extern thing is only a forward declaration.
> OTOH, when both SUSPEND and HIBERNATION are not set,
> PM_SLEEP is not set, so this variable cannot be used.
And it will not be used.
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function
> ‘amdgpu_acpi_is_s0ix_active’:
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error:
> ‘pm_suspend_target_state’ undeclared (first use in this function); did you
> mean ‘__KSYM_pm_suspend_target_state’?
> return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
> ^~~~~~~~~~~~~~~~~~~~~~~
> __KSYM_pm_suspend_target_state
That looks like the .config didn't have CONFIG_SUSPEND enabled.
> Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the
> 2 config symbols.
What shorter notation?
> So it does look like that error can be extracted as well in some
> config.
Yah, when CONFIG_SUSPEND=n.
> Well, now it doesn't seem to be a better one. The original one checked
> both.
I don't see a reason for checking both.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-08-24 14:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 19:42 ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Borislav Petkov
2021-08-23 19:49 ` Alex Deucher
2021-08-23 20:28 ` Borislav Petkov
2021-08-23 20:31 ` Alex Deucher
2021-08-23 20:46 ` Borislav Petkov
2021-08-23 20:49 ` Alex Deucher
2021-08-24 9:42 ` [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export Borislav Petkov
2021-08-24 13:08 ` Lazar, Lijo
2021-08-24 13:40 ` Borislav Petkov
2021-08-24 13:52 ` Lazar, Lijo
2021-08-24 14:37 ` Borislav Petkov [this message]
2021-08-24 15:16 ` Lazar, Lijo
2021-08-24 15:57 ` Alex Deucher
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=YSUEIriLpcQQYy2k@zn.tnic \
--to=bp@alien8.de \
--cc=Pratik.Vishwakarma@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.