Remove unnecessary opayload and newbuf members of bitfury info struct.
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
diff --git a/driver-bitfury.h b/driver-bitfury.h
index fb66114..b8d8ff8 100644
--- a/driver-bitfury.h
+++ b/driver-bitfury.h
@@ -97,8 +97,6 @@ struct bitfury_info {
unsigned int spibufsz;
int osc6_bits;
struct bitfury_payload payload;
- struct bitfury_payload opayload;
- unsigned newbuf[17];
unsigned oldbuf[17];
bool job_switched;
bool second_run;
diff --git a/libbitfury.c b/libbitfury.c
index 9610e15..c6c62d9 100644
--- a/libbitfury.c
+++ b/libbitfury.c
@@ -340,10 +340,9 @@ bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonc
bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury,
struct bitfury_info *info)
{
- unsigned *newbuf = info->newbuf;
+ unsigned newbuf[17];
unsigned *oldbuf = info->oldbuf;
struct bitfury_payload *p = &(info->payload);
- struct bitfury_payload *op = &(info->opayload);
unsigned int localvec[20];
/* Programming next value */
@@ -374,7 +373,6 @@ bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury,
}
}
- memcpy(op, p, sizeof(struct bitfury_payload));
memcpy(oldbuf, newbuf, 17 * 4);
}
} else