Lines Matching refs:nbuf
75 int nbuf; in bts_buffer_free_aux() local
77 for (nbuf = 0; nbuf < buf->nr_bufs; nbuf++) { in bts_buffer_free_aux()
78 struct page *page = buf->buf[nbuf].page; in bts_buffer_free_aux()
96 int pg, nbuf, pad; in bts_buffer_setup_aux() local
99 for (pg = 0, nbuf = 0; pg < nr_pages;) { in bts_buffer_setup_aux()
104 nbuf++; in bts_buffer_setup_aux()
110 if (overwrite && nbuf > 1) in bts_buffer_setup_aux()
113 buf = kzalloc_node(offsetof(struct bts_buffer, buf[nbuf]), GFP_KERNEL, node); in bts_buffer_setup_aux()
118 buf->nr_bufs = nbuf; in bts_buffer_setup_aux()
123 for (pg = 0, nbuf = 0, offset = 0, pad = 0; nbuf < buf->nr_bufs; nbuf++) { in bts_buffer_setup_aux()
132 buf->nr_bufs = nbuf; in bts_buffer_setup_aux()
137 buf->buf[nbuf].page = page; in bts_buffer_setup_aux()
138 buf->buf[nbuf].offset = offset; in bts_buffer_setup_aux()
139 buf->buf[nbuf].displacement = (pad ? BTS_RECORD_SIZE - pad : 0); in bts_buffer_setup_aux()
140 buf->buf[nbuf].size = page_size - buf->buf[nbuf].displacement; in bts_buffer_setup_aux()
141 pad = buf->buf[nbuf].size % BTS_RECORD_SIZE; in bts_buffer_setup_aux()
142 buf->buf[nbuf].size -= pad; in bts_buffer_setup_aux()