Re: [PATCH v2 3/7] USB: serial: ftdi_sio: Extract SIO divisor code to function

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

 



On Tuesday 13 September 2022 16:49:01 Johan Hovold wrote:
> > > > @@ -1286,7 +1303,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
> > > >  {
> > > >  	struct ftdi_private *priv = usb_get_serial_port_data(port);
> > > >  	struct device *dev = &port->dev;
> > > > -	u32 div_value = 0;
> > > > +	int div_value = 0;
> > > 
> > > And don't change the type here.
> > 
> > This type change was explicitly asked during v1 review. v1 had u32.
> 
> Ok, but don't. This variable is used in other parts of this function.

As I said, I changed it just because I was explicitly asked for it
during v1 review. I'm just doing what I was asked.

Maybe... I can change it into union?

  union {
    s32 signed;
    u32 unsigned;
  } div_value;

I really do not see any other option how to achieve requirement that it
should be type of "int" with your another requirement that "do not do it".



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

  Powered by Linux