From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Date: Mon, 20 Nov 2017 20:15:27 +0000 Subject: Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself Message-Id: <5A1337DF.2060404@bfs.de> List-Id: References: <20171120174015.7191-1-colin.king@canonical.com> In-Reply-To: <20171120174015.7191-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Colin King Cc: Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Am 20.11.2017 18:40, schrieb Colin King: > From: Colin Ian King > > The assignment of DIV to itself is redundant and can be removed. > > Signed-off-by: Colin Ian King > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752645AbdKTUPf (ORCPT ); Mon, 20 Nov 2017 15:15:35 -0500 Received: from mx02-sz.bfs.de ([194.94.69.103]:33859 "EHLO mx02-sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbdKTUPd (ORCPT ); Mon, 20 Nov 2017 15:15:33 -0500 Message-ID: <5A1337DF.2060404@bfs.de> Date: Mon, 20 Nov 2017 21:15:27 +0100 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: Colin King CC: Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself References: <20171120174015.7191-1-colin.king@canonical.com> In-Reply-To: <20171120174015.7191-1-colin.king@canonical.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 20.11.2017 18:40, schrieb Colin King: > From: Colin Ian King > > The assignment of DIV to itself is redundant and can be removed. > > Signed-off-by: Colin Ian King > --- > 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