From: Magali Lemes <magalilemes00@gmail.com>
To: harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie,
daniel@ffwll.ch
Cc: siqueirajordao@riseup.net, mwen@igalia.com, maira.canal@usp.br,
isabbasso@riseup.net, Magali Lemes <magalilemes00@gmail.com>,
kernel test robot <lkp@intel.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] drm/amd/display: Add conditional around function
Date: Thu, 24 Feb 2022 16:15:49 -0300 [thread overview]
Message-ID: <20220224191551.69103-3-magalilemes00@gmail.com> (raw)
In-Reply-To: <20220224191551.69103-1-magalilemes00@gmail.com>
When CONFIG_DRM_AMD_DC_DCN is not set, the function
'dm_helpers_enable_periodic_detection' doesn't have its prototype defined,
causing the following warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:805:6:
warning: no previous prototype for function 'dm_helpers_enable_periodic_detection' [-Wmissing-prototypes]
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:805:1:
note: declare 'static' if the function is not intended to be used outside
of this translation unit
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable)
^
static
1 warning generated.
This commit silences this warning by adding a conditional directive
around the mentioned function, and also corrects a small spelling error.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Magali Lemes <magalilemes00@gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 010498ff5911..f5f39984702f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -977,7 +977,9 @@ void dm_set_phyd32clk(struct dc_context *ctx, int freq_khz)
// TODO
}
+#if defined(CONFIG_DRM_AMD_DC_DCN)
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable)
{
- /* TODO: add peridic detection implementation */
+ /* TODO: add periodic detection implementation */
}
+#endif
--
2.25.1
next prev parent reply other threads:[~2022-02-24 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 19:15 [PATCH 0/4] Address a few compilation warnings Magali Lemes
2022-02-24 19:15 ` [PATCH 1/4] drm/amd/display: Adjust functions documentation Magali Lemes
2022-02-24 19:15 ` Magali Lemes [this message]
2022-02-24 19:15 ` [PATCH 3/4] drm/amd/display: Use NULL instead of 0 Magali Lemes
2022-02-24 19:15 ` [PATCH 4/4] drm/amd/display: Turn functions into static Magali Lemes
2022-02-24 19:43 ` [PATCH 0/4] Address a few compilation warnings Harry Wentland
2022-02-24 20:23 ` 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=20220224191551.69103-3-magalilemes00@gmail.com \
--to=magalilemes00@gmail.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=isabbasso@riseup.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=maira.canal@usp.br \
--cc=mwen@igalia.com \
--cc=siqueirajordao@riseup.net \
--cc=sunpeng.li@amd.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®