Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322742
| Path | csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Bjørn Mork <bjorn@mork.no> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 11/14] USB: serial: mos7840: move constants to right |
| Date | Sun, 31 Jan 2016 22:40:02 +0100 |
| Message-ID | <qX7SW-Rd-17@gated-at.bofh.it> (permalink) |
| References | <qWHOO-7mY-3@gated-at.bofh.it> <qWHOP-7mY-39@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=a; t=1454276036; bh=Xc6PrCZMYsAupr8P0nG2GlwvB8prMYxrg81dPRmwV8g=; h=From:To:Cc:References:Date:Message-ID:From; b=lvKWem9g4/Wuhgl/hZ+oCStdSgIvAsk/U7FUNQYcaxl83hmw5loa5fLUIN6M/jQuY zW/utqxXvpvf+XmmM+cUI7/AiIOYmAAnlxTPkddmHucyW6rYcRhSteoZGssJ4nnLRj WB/FQESHiSDpB3gAm+4xTvXKx4xqw3ndsZOcUM0ZJLIt+So305mFFrh5XJH79IkqeZ FkWkVw9gHgD7jAD7jbLC/fqb9xENCxNddRPSmEN/sKjJGdy8RlEW18/Wz7cf5TW/x+ Mg6OxUXxRh91pLUpfMY4QoX3R6kJ3slznwwsDIS0L6RkeVYPnUKGKeOTCQlKU8l3hj LrfC3fkTYnQew== |
| Organization | m |
| User-Agent | Gnus/5.130013 (Ma Gnus v0.13) Emacs/24.5 (gnu/linux) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8BIT |
| X-Virus-Status | Clean |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| X-Original-Cc | johan@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org |
| X-Original-Date | Sun, 31 Jan 2016 22:33:54 +0100 |
| X-Original-Message-ID | <87zivltovx.fsf@nemi.mork.no> |
| X-Original-References | <1454175887-16158-1-git-send-email-m.othacehe@gmail.com> <1454175887-16158-12-git-send-email-m.othacehe@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1322742 |
Show key headers only | View raw
Mathieu OTHACEHE <m.othacehe@gmail.com> writes: > This patch fixes the following coccinelle warnings: > > drivers/usb/serial/mos7840.c:2042:4-10: Move constant to right. > drivers/usb/serial/mos7840.c:2062:16-22: Move constant to right. > > Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com> > --- > drivers/usb/serial/mos7840.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c > index 8ddc313..982a3fb 100644 > --- a/drivers/usb/serial/mos7840.c > +++ b/drivers/usb/serial/mos7840.c > @@ -2039,7 +2039,7 @@ static int mos7810_check(struct usb_serial *serial) > /* Send the 1-bit test pattern out to MCS7810 test pin */ > usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), > MCS_WRREQ, MCS_WR_RTYPE, > - (0x0300 | (((test_pattern >> i) & 0x0001) << 1)), > + ((((test_pattern >> i) & 0x0001) << 1) | 0x0300), > MODEM_CONTROL_REGISTER, NULL, 0, MOS_WDR_TIMEOUT); > > /* Read the test pattern back */ > @@ -2059,7 +2059,7 @@ static int mos7810_check(struct usb_serial *serial) > > /* Restore MCR setting */ > usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), MCS_WRREQ, > - MCS_WR_RTYPE, 0x0300 | mcr_data, MODEM_CONTROL_REGISTER, NULL, > + MCS_WR_RTYPE, mcr_data | 0x0300, MODEM_CONTROL_REGISTER, NULL, > 0, MOS_WDR_TIMEOUT); > > kfree(buf); I feel I'm missing something here, so I have to ask the stupid question: What could possibly be the benefit here? Is it faster? Safer? Easier to read? Bjørn
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/14] USB: serial: Fix coccinelle warnings Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 06/14] USB: serial: garmin_gps: move constants to right Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 02/14] USB: serial: safe_serial: fix assignment of bool to non 0/1 constant Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 05/14] USB: serial: mos7840: remove comparison to bool Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 13/14] USB: serial: f81232: move constants to right Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 03/14] USB: serial: quatech2: remove comparison to bool Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 11/14] USB: serial: mos7840: move constants to right Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
Re: [PATCH 11/14] USB: serial: mos7840: move constants to right Bjørn Mork <bjorn@mork.no> - 2016-01-31 22:40 +0100
Re: [PATCH 11/14] USB: serial: mos7840: move constants to right Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-02-01 13:00 +0100
Re: [PATCH 11/14] USB: serial: mos7840: move constants to right Bjørn Mork <bjorn@mork.no> - 2016-02-01 13:40 +0100
[PATCH 10/14] USB: serial: garmin_gps: remove unneeded variable Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 01/14] USB: serial: safe_serial: fix assignment of bool to 0/1 Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
[PATCH 08/14] USB: serial: keyspan: remove unused semicolon Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-01-30 18:50 +0100
Re: [PATCH 00/14] USB: serial: Fix coccinelle warnings Johan Hovold <johan@kernel.org> - 2016-01-31 21:20 +0100
csiph-web