RE: [PATCH v2 4/9] staging: comedi: ni_usb6501: rename ni6501_send_command()

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

 



On Tuesday, September 16, 2014 4:40 AM, Luca Ellero wrote:
> Rename ni6501_send_command to ni6501_port_command
>
> Signed-off-by: Luca Ellero <luca.ellero@xxxxxxxxxxxxxxxx>
> ---
>  drivers/staging/comedi/drivers/ni_usb6501.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_usb6501.c b/drivers/staging/comedi/drivers/ni_usb6501.c
> index 91c0e22..f55b9f8 100644
> --- a/drivers/staging/comedi/drivers/ni_usb6501.c
> +++ b/drivers/staging/comedi/drivers/ni_usb6501.c
> @@ -172,7 +172,7 @@ struct ni6501_private {
>  	u8 *usb_tx_buf;
>  };
>  
> -static int ni6501_send_command(struct comedi_device *dev, int command,
> +static int ni6501_port_command(struct comedi_device *dev, int command,
>  			       const u8 *port, u8 *bitmap)
>  {
 
No comments on this patch but a side note (nit-picks) about
ni6501_port_command().

This function is only called in the driver and the 'port' parameter
is always valid. The 'devpriv->usb_tx_buf' is also always valid or
the driver fails the (*auto_attach). Thus this test is not needed:

	if (!tx || !port)
		return -EINVAL;

This could be removed in a separate patch.

There is also some unnecessary white space after the case statements
and before the break statements.

Again, these could be removed in a separate patch.

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