Re: [PATCH] USB: serial: ftdi_sio: fix setting latency for unprivileged users

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

 



On Tue, May 02, 2017 at 07:17:01PM +0200, Anthony Mallet wrote:
> Commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY
> flag") enables unprivileged users to set the FTDI latency timer,
> but there was a logic flaw that skipped sending the corresponding
> USB control message to the device.
> 
> Signed-off-by: Anthony Mallet <anthony.mallet@xxxxxxx>
> 
> ---
> 
> Here is the patch, feel free to update the message and/or replace the
> Signed-off-by if you like.

Thanks, this looks really good, apart from one little thing: patches
should be based in the root kernel source directory, not in any lower
subdirectory (as mentioned in the process document).

git-format-patch is also a very convenient way to get the job done (see
also git-send-email).

I could fix this up if you prefer, but I suggest you respin the patch as
a v2 (remember to add v2 inside the "[PATCH v2]" prefix and add a short
changelog below the cut-off line) so that you've mastered the full
process for next time.

What do you say?

> --- drivers/usb/serial/ftdi_sio.c~	2017-04-28 11:20:30.339227000 +0200
> +++ drivers/usb/serial/ftdi_sio.c	2017-04-28 11:20:52.647773000 +0200

So there should have been a directory before drivers in the above paths;
that's all that's missing.

There's a tool scripts/checkpatch.pl which you can run on a patch to
check for some common mistakes and which would have caught this one.

> @@ -1505,9 +1505,9 @@ static int set_serial_info(struct tty_st
>  					(new_serial.flags & ASYNC_FLAGS));
>  	priv->custom_divisor = new_serial.custom_divisor;
>  
> +check_and_exit:
>  	write_latency_timer(port);
>  
> -check_and_exit:
>  	if ((old_priv.flags & ASYNC_SPD_MASK) !=
>  	     (priv->flags & ASYNC_SPD_MASK)) {
>  		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux