Re: [PATCH v1 1/1] serial: core: enforce type for upf_t when copying

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

 



On Thu, 2016-11-10 at 15:39 +0100, Greg Kroah-Hartman wrote:
> On Thu, Nov 10, 2016 at 04:23:23PM +0200, Andy Shevchenko wrote:
> > On Thu, 2016-11-10 at 14:57 +0100, Greg Kroah-Hartman wrote:
> > > On Thu, Nov 03, 2016 at 06:27:39PM +0200, Andy Shevchenko wrote:


> But:
> 
> > > 
> > > >  	retinfo->xmit_fifo_size  = uport->fifosize;
> > > >  	retinfo->baud_base	    = uport->uartclk / 16;
> > > >  	retinfo->close_delay	    =
> > > > jiffies_to_msecs(port-
> > > > > close_delay) / 10;
> > > > 
> > > > @@ -820,7 +820,7 @@ static int uart_set_info(struct tty_struct
> > > > *tty,
> > > > struct tty_port *port,
> > > >  		    new_info->type != uport->type);
> > > >  
> > > >  	old_flags = uport->flags;
> > > > -	new_flags = new_info->flags;
> > > > +	new_flags = (__force upf_t)new_info->flags;
> > > 
> > > same here, why not fix new_flags?
> 
> new_flags is a local variable, that shouldn't need to be forced.

Unfortunately we can't get rid of __force, otherwise another warning
pops up (upf_t is bitwise variable):

drivers/tty/serial/serial_core.c:867:22: warning: cast to restricted
upf_t

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
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