Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>, <chiahsuan.chung@amd.com>
Cc: <alex.hung@amd.com>
Subject: [PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h
Date: Thu, 13 Mar 2025 21:32:49 -0600	[thread overview]
Message-ID: <20250314033249.2426485-1-alex.hung@amd.com> (raw)

Add missing include file to fix cross-compilation errors:

../tests/amdgpu/amd_hotplug.c: In function ‘is_system_s2idle’:
../tests/amdgpu/amd_hotplug.c:110:7: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
  fd = open(MEM_SLEEP_PATH, O_RDONLY);
       ^~~~
       popen
../tests/amdgpu/amd_hotplug.c:110:7: warning: nested extern declaration of ‘open’ [-Wnested-externs]
../tests/amdgpu/amd_hotplug.c:110:28: error: ‘O_RDONLY’ undeclared (first use in this function); did you mean ‘STA_RONLY’?
  fd = open(MEM_SLEEP_PATH, O_RDONLY);
                            ^~~~~~~~
                            STA_RONLY

Fixes: 6796e79abba2 ("tests/amdgpu/amd_hotplug: Check the suspend state after resume")
Signed-off-by: Alex Hung <alex.hung@amd.com>
---
 tests/amdgpu/amd_hotplug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/amdgpu/amd_hotplug.c b/tests/amdgpu/amd_hotplug.c
index ee3256c0b..bbd50452b 100644
--- a/tests/amdgpu/amd_hotplug.c
+++ b/tests/amdgpu/amd_hotplug.c
@@ -20,6 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <fcntl.h>
+
 #include "igt.h"
 #include "igt_amd.h"
 
-- 
2.43.0


             reply	other threads:[~2025-03-14  3:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14  3:32 Alex Hung [this message]
2025-03-14  7:57 ` [PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h Chung, ChiaHsuan (Tom)
2025-03-14 16:32   ` Kamil Konieczny
2025-03-14 18:49 ` ✓ Xe.CI.Full: success for " Patchwork
2025-03-14 23:38 ` ✗ Fi.CI.BAT: failure for tests/amdgpu/amd_hotplug: add missing include file fcntl.h (rev2) Patchwork

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=20250314033249.2426485-1-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=igt-dev@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox