mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
tools/power turbostat: Remove unnecessary fflush() call
The graphics sysfs knobs are read-only, making the use of fflush() before reading them redundant. Remove the unnecessary fflush() call. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
1958f4e168
commit
ba99a4fc8c
@ -5780,12 +5780,11 @@ int snapshot_graphics(int idx)
|
|||||||
case GFX_ACTMHz:
|
case GFX_ACTMHz:
|
||||||
case SAM_MHz:
|
case SAM_MHz:
|
||||||
case SAM_ACTMHz:
|
case SAM_ACTMHz:
|
||||||
if (gfx_info[idx].fp == NULL) {
|
if (gfx_info[idx].fp == NULL)
|
||||||
gfx_info[idx].fp = fopen_or_die(gfx_info[idx].path, "r");
|
gfx_info[idx].fp = fopen_or_die(gfx_info[idx].path, "r");
|
||||||
} else {
|
else
|
||||||
rewind(gfx_info[idx].fp);
|
rewind(gfx_info[idx].fp);
|
||||||
fflush(gfx_info[idx].fp);
|
|
||||||
}
|
|
||||||
retval = fscanf(gfx_info[idx].fp, "%d", &gfx_info[idx].val);
|
retval = fscanf(gfx_info[idx].fp, "%d", &gfx_info[idx].val);
|
||||||
if (retval != 1)
|
if (retval != 1)
|
||||||
err(1, "MHz");
|
err(1, "MHz");
|
||||||
|
Loading…
Reference in New Issue
Block a user