Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: comedi: comedi_buf: remove noise in comedi_buf_read_free()

If an attempt is made to free more bytes than have been allocated
a dev_info message is output and the number of bytes to free is
adjusted to the allocated size.

Telling the user this happened is just noise. Remove the message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbobbi@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

H Hartley Sweeten and committed by
Greg Kroah-Hartman
215040e1 6166ce87

+2 -4
+2 -4
drivers/staging/comedi/comedi_buf.c
··· 324 324 smp_mb(); 325 325 326 326 allocated = comedi_buf_read_n_allocated(async); 327 - if (nbytes > allocated) { 328 - dev_info(async->subdevice->device->class_dev, 329 - "attempted to read-free more bytes than have been read-allocated.\n"); 327 + if (nbytes > allocated) 330 328 nbytes = allocated; 331 - } 329 + 332 330 async->buf_read_count += nbytes; 333 331 async->buf_read_ptr += nbytes; 334 332 async->buf_read_ptr %= async->prealloc_bufsz;