Function cs_etm__sample() is called only from cs_etm__run_decoder() where
cs_etm_queue::have_sample is set to 'true'. As such checking the value of
the variable again in cs_etm__sample() is not needed.
Since the variable isn't used anywhere else, also removing it from the
structure definition.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
u64 time;
u64 timestamp;
bool stop;
- bool have_sample;
struct cs_etm_decoder *decoder;
u64 offset;
bool eot;
//struct cs_etm_auxtrace *etm = etmq->etm;
int err;
- if (!etmq->have_sample)
- return 0;
-
- etmq->have_sample = false;
-
err = cs_etm_decoder__get_packet(etmq->decoder,&packet);
// if there is no sample, it returns err = -1, no real error
err = etmq->state->err;
etmq->offset += processed;
buffer_used += processed;
- if (!err) {
- etmq->have_sample = true;
+ if (!err)
cs_etm__sample(etmq);
- }
} while (!etmq->eot && (buffer.len > buffer_used));
goto more;