[PATCH] tests/amdgpu/amd_hotplug: add missing include file fcntl.h
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Mar 14 16:32:29 UTC 2025
Hi Chung,,
On 2025-03-14 at 15:57:24 +0800, Chung, ChiaHsuan (Tom) wrote:
> Thank you so much.
>
> Reviewed-by: Tom Chung <chiahsuan.chung at amd.com>
>
Applied, thank you for quick fix.
Regards,
Kamil
> On 3/14/2025 11:32 AM, Alex Hung wrote:
> > 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 at 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"
More information about the igt-dev
mailing list