Browse Source

Style police on driver-ztex.c

nfactor-troky
Con Kolivas 13 years ago
parent
commit
78a32f2ebc
  1. 9
      driver-ztex.c

9
driver-ztex.c

@ -36,7 +36,7 @@ struct device_api ztex_api, ztex_hotplug_api; @@ -36,7 +36,7 @@ struct device_api ztex_api, ztex_hotplug_api;
static void ztex_disable(struct thr_info* thr);
static bool ztex_prepare(struct thr_info *thr);
static void ztex_detect()
static void ztex_detect(void)
{
int cnt;
int i;
@ -95,7 +95,8 @@ static bool ztex_updateFreq (struct libztex_device* ztex) @@ -95,7 +95,8 @@ static bool ztex_updateFreq (struct libztex_device* ztex)
maxM++;
if ((bestM < (1.0 - LIBZTEX_OVERHEATTHRESHOLD) * maxM) && bestM < maxM - 1) {
libztex_resetFpga(ztex);
applog(LOG_ERR, "%s: frequency drop of %.1f%% detect. This may be caused by overheating. FPGA is shut down to prevent damage.", ztex->repr, (1.0-1.0*bestM/maxM)*100);
applog(LOG_ERR, "%s: frequency drop of %.1f%% detect. This may be caused by overheating. FPGA is shut down to prevent damage.",
ztex->repr, (1.0 - 1.0 * bestM / maxM) * 100);
return false;
}
return true;
@ -217,9 +218,8 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work, @@ -217,9 +218,8 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work,
if (((nonce & 0x7fffffff) >> 4) < ((lastnonce[i] & 0x7fffffff) >> 4)) {
applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]);
overflow = true;
} else {
} else
lastnonce[i] = nonce;
}
#if !(defined(__BIGENDIAN__) || defined(MIPSEB))
nonce = swab32(nonce);
#endif
@ -320,4 +320,3 @@ struct device_api ztex_api = { @@ -320,4 +320,3 @@ struct device_api ztex_api = {
.scanhash = ztex_scanhash,
.thread_shutdown = ztex_shutdown,
};

Loading…
Cancel
Save