* [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself
@ 2017-11-20 17:40 Colin King
2017-11-20 20:15 ` walter harms
2017-11-27 12:52 ` Johan Hovold
0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2017-11-20 17:40 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman, linux-usb; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment of DIV to itself is redundant and can be removed.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/usb/serial/iuu_phoenix.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 397a8012ffa3..62c91e360baf 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -472,7 +472,6 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
}
}
P2 = ((P - PO) / 2) - 4;
- DIV = DIV;
PUMP = 0x04;
PBmsb = (P2 >> 8 & 0x03);
PBlsb = P2 & 0xFF;
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself
2017-11-20 17:40 [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself Colin King
@ 2017-11-20 20:15 ` walter harms
2017-11-27 13:06 ` Johan Hovold
2017-11-27 12:52 ` Johan Hovold
1 sibling, 1 reply; 4+ messages in thread
From: walter harms @ 2017-11-20 20:15 UTC (permalink / raw)
To: Colin King
Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors,
linux-kernel
Am 20.11.2017 18:40, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of DIV to itself is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/usb/serial/iuu_phoenix.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
> index 397a8012ffa3..62c91e360baf 100644
> --- a/drivers/usb/serial/iuu_phoenix.c
> +++ b/drivers/usb/serial/iuu_phoenix.c
> @@ -472,7 +472,6 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
> }
> }
> P2 = ((P - PO) / 2) - 4;
> - DIV = DIV;
> PUMP = 0x04;
> PBmsb = (P2 >> 8 & 0x03);
> PBlsb = P2 & 0xFF;
These all all-upper-case stuff makes me a bit nervous. Normally this
is reserved for #define ( I assume that the programmer refers to
the original documentation) a point to change ?
btw: i noticed int frq = (int)dwFrq;
since dwFrq is already an in, the cast is useless.
just ym 2 cents,
re,
wh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself
2017-11-20 17:40 [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself Colin King
2017-11-20 20:15 ` walter harms
@ 2017-11-27 12:52 ` Johan Hovold
1 sibling, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2017-11-27 12:52 UTC (permalink / raw)
To: Colin King
Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors,
linux-kernel
On Mon, Nov 20, 2017 at 05:40:15PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of DIV to itself is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Now applied, thanks.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself
2017-11-20 20:15 ` walter harms
@ 2017-11-27 13:06 ` Johan Hovold
0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2017-11-27 13:06 UTC (permalink / raw)
To: walter harms
Cc: Colin King, Johan Hovold, Greg Kroah-Hartman, linux-usb,
kernel-janitors, linux-kernel
On Mon, Nov 20, 2017 at 09:15:27PM +0100, walter harms wrote:
> Am 20.11.2017 18:40, schrieb Colin King:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The assignment of DIV to itself is redundant and can be removed.
> >
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> > drivers/usb/serial/iuu_phoenix.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
> > index 397a8012ffa3..62c91e360baf 100644
> > --- a/drivers/usb/serial/iuu_phoenix.c
> > +++ b/drivers/usb/serial/iuu_phoenix.c
> > @@ -472,7 +472,6 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
> > }
> > }
> > P2 = ((P - PO) / 2) - 4;
> > - DIV = DIV;
> > PUMP = 0x04;
> > PBmsb = (P2 >> 8 & 0x03);
> > PBlsb = P2 & 0xFF;
>
> These all all-upper-case stuff makes me a bit nervous. Normally this
> is reserved for #define ( I assume that the programmer refers to
> the original documentation) a point to change ?
Yeah, this isn't pretty and appears to have been copied directly from
the iuutool userspace tool (mentioned in the header).
> btw: i noticed int frq = (int)dwFrq;
> since dwFrq is already an in, the cast is useless.
Indeed. Also present in original code.
This driver went in marked as "experimental", but the dependency on
CONFIG_EXPERIMENTAL was later dropped. These days something like this
would have need to be cleaned up (e.g. in staging) before getting
merged.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-27 13:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20 17:40 [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself Colin King
2017-11-20 20:15 ` walter harms
2017-11-27 13:06 ` Johan Hovold
2017-11-27 12:52 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).