Skip to content

Commit

Permalink
kncasic: Only show the relevant die for RPC stats
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Oct 17, 2014
1 parent 4b995f3 commit 7d2eef8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions driver-kncasic.c
Expand Up @@ -773,8 +773,10 @@ static void knc_zero_stats(struct cgpu_info *cgpu)
static struct api_data *knc_api_stats(struct cgpu_info *cgpu)
{
struct knc_state *knc = cgpu->device_data;
struct knc_core_state * const proccore = &knc->core[cgpu->proc_id];
struct knc_die * const die = proccore->die;
struct api_data *root = NULL;
int core, n;
int core;
char label[256];

root = api_add_int(root, "dies", &knc->dies, 1);
Expand All @@ -793,9 +795,7 @@ static struct api_data *knc_api_stats(struct cgpu_info *cgpu)
root = api_add_int(root, "active", &active, 1);

/* Per ASIC/die data */
for (n = 0; n < knc->dies; n++) {
struct knc_die *die = &knc->die[n];

{
#define knc_api_die_string(name, value) do { \
snprintf(label, sizeof(label), "%d.%d.%s", die->channel, die->die, name); \
root = api_add_string(root, label, value, 1); \
Expand Down

0 comments on commit 7d2eef8

Please sign in to comment.