Lines Matching refs:fb
455 static void fifo_set(struct fifo_buffer *fb, int value) in fifo_set() argument
459 for (i = 0; i < fb->size; i++) in fifo_set()
460 fb->values[i] = value; in fifo_set()
463 static int fifo_push(struct fifo_buffer *fb, int value) in fifo_push() argument
467 ov = fb->values[fb->head_index]; in fifo_push()
468 fb->values[fb->head_index++] = value; in fifo_push()
470 if (fb->head_index >= fb->size) in fifo_push()
471 fb->head_index = 0; in fifo_push()
476 static void fifo_add_val(struct fifo_buffer *fb, int value) in fifo_add_val() argument
480 for (i = 0; i < fb->size; i++) in fifo_add_val()
481 fb->values[i] += value; in fifo_add_val()
486 struct fifo_buffer *fb; in fifo_alloc() local
488 fb = kzalloc(sizeof(struct fifo_buffer) + sizeof(int) * fifo_size, GFP_NOIO); in fifo_alloc()
489 if (!fb) in fifo_alloc()
492 fb->head_index = 0; in fifo_alloc()
493 fb->size = fifo_size; in fifo_alloc()
494 fb->total = 0; in fifo_alloc()
496 return fb; in fifo_alloc()