Lines Matching refs:buf_len
882 static int calc_sg_cnt(void *buf, int buf_len) in calc_sg_cnt() argument
886 if (!buf_len) in calc_sg_cnt()
889 sg_cnt = need_padding(buf_len) ? 1 : 0; in calc_sg_cnt()
892 sg_cnt += PAGE_ALIGN(buf_len) >> PAGE_SHIFT; in calc_sg_cnt()
920 static void init_sgs(struct scatterlist **sg, void *buf, int buf_len, u8 *pad) in init_sgs() argument
922 void *end = buf + buf_len; in init_sgs()
927 if (!buf_len) in init_sgs()
941 sg_set_buf(*sg, buf, buf_len); in init_sgs()
945 if (need_padding(buf_len)) { in init_sgs()
946 sg_set_buf(*sg, pad, padding_len(buf_len)); in init_sgs()
1067 int buf_len = CEPH_BANNER_V2_LEN + 2 + 8 + 8; in prepare_banner() local
1070 buf = alloc_conn_buf(con, buf_len); in prepare_banner()
1079 WARN_ON(p != buf + buf_len); in prepare_banner()
1081 add_out_kvec(con, buf, buf_len); in prepare_banner()
1082 add_out_sign_kvec(con, buf, buf_len); in prepare_banner()