mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
tests/pm_rpm: fix some compilation warnings
warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
parent
7308e3a92b
commit
97715d5f0f
@ -693,7 +693,7 @@ static void setup_non_graphics_runtime_pm(void)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
write(fd, "min_power\n", 10);
|
igt_assert(write(fd, "min_power\n", 10) == 10);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
free(file_name);
|
free(file_name);
|
||||||
@ -701,12 +701,12 @@ static void setup_non_graphics_runtime_pm(void)
|
|||||||
/* Audio runtime PM policies. */
|
/* Audio runtime PM policies. */
|
||||||
fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY);
|
fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
write(fd, "1\n", 2);
|
igt_assert(write(fd, "1\n", 2) == 2);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY);
|
fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
write(fd, "auto\n", 5);
|
igt_assert(write(fd, "auto\n", 5) == 5);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user