sjur.brandeland@xxxxxxxxxxxxxx writes: > From: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx> > > Refactoring the splice functionality by unifying the approach for > sending scatter-lists and regular buffers. This simplifies > buffer handling and reduces code size. Splice will now allocate > a port_buffer and send_buf() and free_buf() can always be used > for any buffer. > > Signed-off-by: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx> This looks sensible; a couple of extra blank lines inserted though. Amit? > @@ -1033,6 +1008,8 @@ static const struct file_operations port_fops = { > static int put_chars(u32 vtermno, const char *buf, int count) > { > struct port *port; > + struct scatterlist sg[1]; > + > > if (unlikely(early_put_chars)) > return early_put_chars(vtermno, buf, count); > @@ -1041,7 +1018,9 @@ static int put_chars(u32 vtermno, const char *buf, int count) > if (!port) > return -EPIPE; > > - return send_buf(port, (void *)buf, count, false); > + sg_init_one(sg, buf, count); > + return __send_to_port(port, sg, 1, count, (void *)buf, false); > + > } > > /* Cheers, Rusty. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization