Re: [PATCH] serial: mxser.c - Cleanup opmode shiftbit calculation

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

 



On Wed, Jun 15, 2016 at 02:24:17PM +0200, Michal Kadlic wrote:
> Replace opmode shiftbit calculations with stored value per port (mxser_port.opmode_shift) .  Preload value in mxser_probe routine.

Please properly wrap your lines in the changelog text.

> 
> Signed-off-by: Michal Kadlic <michal.kadlic@xxxxxxxxx>
> 
> ---
> 
> Mxser driver uses a packed opmode register ( 2bits per port) to switch between RS232,RS485 and RS422 mode. Shiftbit variable is calculated in several places to determine correct bits per port.
> 
> Reasons for change:
> 
> 1. Code cleanup - remove calculations scattered in code
> 2. ARCH_MOXART could use mxser.c in the future but it uses different bit offsets, so each calculation would need an #ifdef.

Why isn't this above in the changelog text?

> 
> ---
> 
> diff -purN old/drivers/tty/mxser.c new/drivers/tty/mxser.c
> --- old/drivers/tty/mxser.c        2016-06-15 13:22:50.000000000 +0200
> +++ new/drivers/tty/mxser.c        2016-06-15 13:33:23.000000000 +0200
> @@ -256,6 +256,8 @@ struct mxser_port {
>          int xmit_cnt;
>          int closing;
>  
> +        unsigned char opmode_shift; /* Position of opmode bits in opmode register */

Always run your patches through checkpatch.pl so that a maintainer
doesn't have to tell you to run your patches through checkpatch.pl...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux