Remove unused per unit matching work count for avalon.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/driver-avalon.c b/driver-avalon.c
index 7ecf7d8..69e78ef 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -289,7 +289,7 @@ static bool avalon_decode_nonce(struct thr_info *thr, struct avalon_result *ar,
{
struct cgpu_info *avalon;
struct avalon_info *info;
- int avalon_get_work_count, i;
+ int avalon_get_work_count;
struct work *work;
avalon = thr->cgpu;
@@ -301,7 +301,7 @@ static bool avalon_decode_nonce(struct thr_info *thr, struct avalon_result *ar,
return false;
info = avalon_infos[avalon->device_id];
- info->matching_work[i]++;
+ info->matching_work++;
*nonce = htole32(ar->nonce);
submit_nonce(thr, work, *nonce);
@@ -960,30 +960,7 @@ static struct api_data *avalon_api_stats(struct cgpu_info *cgpu)
root = api_add_int(root, "temp_max", &(info->temp_max), false);
root = api_add_int(root, "no_matching_work", &(info->no_matching_work), false);
- root = api_add_int(root, "matching_work_count1", &(info->matching_work[0]), false);
- root = api_add_int(root, "matching_work_count2", &(info->matching_work[1]), false);
- root = api_add_int(root, "matching_work_count3", &(info->matching_work[2]), false);
- root = api_add_int(root, "matching_work_count4", &(info->matching_work[3]), false);
- root = api_add_int(root, "matching_work_count5", &(info->matching_work[4]), false);
- root = api_add_int(root, "matching_work_count6", &(info->matching_work[5]), false);
- root = api_add_int(root, "matching_work_count7", &(info->matching_work[6]), false);
- root = api_add_int(root, "matching_work_count8", &(info->matching_work[7]), false);
- root = api_add_int(root, "matching_work_count9", &(info->matching_work[8]), false);
- root = api_add_int(root, "matching_work_count10", &(info->matching_work[9]), false);
- root = api_add_int(root, "matching_work_count11", &(info->matching_work[10]), false);
- root = api_add_int(root, "matching_work_count12", &(info->matching_work[11]), false);
- root = api_add_int(root, "matching_work_count13", &(info->matching_work[12]), false);
- root = api_add_int(root, "matching_work_count14", &(info->matching_work[13]), false);
- root = api_add_int(root, "matching_work_count15", &(info->matching_work[14]), false);
- root = api_add_int(root, "matching_work_count16", &(info->matching_work[15]), false);
- root = api_add_int(root, "matching_work_count17", &(info->matching_work[16]), false);
- root = api_add_int(root, "matching_work_count18", &(info->matching_work[17]), false);
- root = api_add_int(root, "matching_work_count19", &(info->matching_work[18]), false);
- root = api_add_int(root, "matching_work_count20", &(info->matching_work[19]), false);
- root = api_add_int(root, "matching_work_count21", &(info->matching_work[20]), false);
- root = api_add_int(root, "matching_work_count22", &(info->matching_work[21]), false);
- root = api_add_int(root, "matching_work_count23", &(info->matching_work[22]), false);
- root = api_add_int(root, "matching_work_count24", &(info->matching_work[23]), false);
+ root = api_add_int(root, "matching_work_count", &(info->matching_work), false);
return root;
}
diff --git a/driver-avalon.h b/driver-avalon.h
index f860740..c040d03 100644
--- a/driver-avalon.h
+++ b/driver-avalon.h
@@ -95,7 +95,7 @@ struct avalon_info {
int fan_pwm;
int no_matching_work;
- int matching_work[AVALON_DEFAULT_MINER_NUM];
+ int matching_work;
int frequency;
};