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

Configure Feed

Select the types of activity you want to include in your feed.

comedi: ni_pcidio: Do not bother filling buffer with 0xaa byte values

On buffer change, the driver informs the mite module about the buffer
change and then it fills the buffer with byte value `0xaa` using
`memset()`. Do not bother filling the buffer. None of the other Comedi
drivers do this.

The aim is to get rid of the `prealloc_buf` member of `struct
comedi_async` (which is from a `vmap()` covering the whole buffer in
those Comedi drivers that do not use DMA), and use the per-buffer-page
addresses from the `virt_addr` member of `struct comedi_buf_page` to
access the buffer contents instead.

(If necessary, we could add a `comedi_buf_memset()` function to fill the
buffer with a byte value, but it's not worth it in this case.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20250415114008.5977-2-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ian Abbott and committed by
Greg Kroah-Hartman
cb0dde4d a7924f4c

-2
-2
drivers/comedi/drivers/ni_pcidio.c
··· 747 747 if (ret < 0) 748 748 return ret; 749 749 750 - memset(s->async->prealloc_buf, 0xaa, s->async->prealloc_bufsz); 751 - 752 750 return 0; 753 751 } 754 752