RE: [PATCH 01/35] staging: comedi: use unsigned samples for comedi_buf_put()/get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, October 16, 2013 6:40 AM, Ian Abbott wrote:
> Sample values in comedi are generally represented as unsigned values.
> `comedi_buf_put()` and `comedi_buf_get()` use a `short` to hold the
> 16-bit data value being transferred to or from the comedi buffer.
> Change them to use `unsigned short` for consistency.
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---
>  drivers/staging/comedi/comedi_buf.c | 8 ++++----
>  drivers/staging/comedi/comedidev.h  | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
> index 94b2385f..4e26bd7 100644
> --- a/drivers/staging/comedi/comedi_buf.c
> +++ b/drivers/staging/comedi/comedi_buf.c
> @@ -344,7 +344,7 @@ unsigned int comedi_buf_read_free(struct comedi_async *async,
>  }
>  EXPORT_SYMBOL_GPL(comedi_buf_read_free);
>  
> -int comedi_buf_put(struct comedi_async *async, short x)
> +int comedi_buf_put(struct comedi_async *async, unsigned short x)
>  {
>  	unsigned int n = __comedi_buf_write_alloc(async, sizeof(short), 1);
 
Ian,

I'm finally getting a chance to look at this series. It looks like Greg already applied it.

I have a minor nit on this one.

The *_alloc() and *_free() calls are passing a sizeof(short) but the data is now
unsigned short. The result is the same but it looks strange.

Regards,
Hartley
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux