acp: skip the first bucket on recovering acp

Since the threshold for the first bucket is always zero and the condition to
exit from the loop is never met in the first iteration it is save to start
iterating from `1`

This change is meant to avoid confusing static code analyzers

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2022-04-11 13:05:12 +02:00
parent 99608c9a30
commit cd4d894348

View File

@ -405,7 +405,7 @@ static void ocf_acp_recovery_chunk(struct ocf_acp_recovery_context *context,
.chunk[chunk->core_id][chunk->chunk_id];
}
for (bucket_id = 0; bucket_id < ACP_MAX_BUCKETS; bucket_id++) {
for (bucket_id = 1; bucket_id < ACP_MAX_BUCKETS; bucket_id++) {
bucket = &acp->bucket_info[bucket_id];
if (chunk->num_dirty < bucket->threshold)
break;