Commit f1d8e2bf authored by Colin Ian King's avatar Colin Ian King Committed by Tvrtko Ursulin

drm/i915/perf: remove redundant variable 'taken'

The assignment to variable taken is redundant and so it can be
removed as well as the variable too.

Cleans up clang-scan build warnings:
warning: Although the value stored to 'taken' is used in the enclosing
expression, the value is never actually read from 'taken'
[deadcode.DeadStores]
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221007195345.2749911-1-colin.i.king@gmail.com
parent 178ce94a
...@@ -656,7 +656,6 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, ...@@ -656,7 +656,6 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
size_t start_offset = *offset; size_t start_offset = *offset;
unsigned long flags; unsigned long flags;
u32 head, tail; u32 head, tail;
u32 taken;
int ret = 0; int ret = 0;
if (drm_WARN_ON(&uncore->i915->drm, !stream->enabled)) if (drm_WARN_ON(&uncore->i915->drm, !stream->enabled))
...@@ -692,7 +691,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, ...@@ -692,7 +691,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
for (/* none */; for (/* none */;
(taken = OA_TAKEN(tail, head)); OA_TAKEN(tail, head);
head = (head + report_size) & mask) { head = (head + report_size) & mask) {
u8 *report = oa_buf_base + head; u8 *report = oa_buf_base + head;
u32 *report32 = (void *)report; u32 *report32 = (void *)report;
...@@ -950,7 +949,6 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream, ...@@ -950,7 +949,6 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
size_t start_offset = *offset; size_t start_offset = *offset;
unsigned long flags; unsigned long flags;
u32 head, tail; u32 head, tail;
u32 taken;
int ret = 0; int ret = 0;
if (drm_WARN_ON(&uncore->i915->drm, !stream->enabled)) if (drm_WARN_ON(&uncore->i915->drm, !stream->enabled))
...@@ -984,7 +982,7 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream, ...@@ -984,7 +982,7 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
for (/* none */; for (/* none */;
(taken = OA_TAKEN(tail, head)); OA_TAKEN(tail, head);
head = (head + report_size) & mask) { head = (head + report_size) & mask) {
u8 *report = oa_buf_base + head; u8 *report = oa_buf_base + head;
u32 *report32 = (void *)report; u32 *report32 = (void *)report;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment