lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 13 Jan 2016 19:28:39 +0200 From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com> To: Anton Wuerfel <anton.wuerfel@....de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Jiri Slaby <jslaby@...e.com>, "James E.J. Bottomley" <jejb@...isc-linux.org>, Helge Deller <deller@....de>, Peter Hurley <peter@...leysoftware.com>, Heikki Krogerus <heikki.krogerus@...ux.intel.com>, Qipeng Zha <qipeng.zha@...el.com>, Desmond Liu <desmondl@...adcom.com>, Wang Long <long.wanglong@...wei.com>, Matt Redfearn <matt.redfearn@...tec.com>, Paul Burton <paul.burton@...tec.com>, Ralf Baechle <ralf@...ux-mips.org>, Krzysztof Kozlowski <k.kozlowski@...sung.com>, Peter Hung <hpeter@...il.com>, Soeren Grunewald <soeren.grunewald@...y.de>, Adam Lee <adam.lee@...onical.com>, "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>, Mans Rullgard <mans@...sr.com>, linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org, linux-kernel@...cs.fau.de, Phillip Raffeck <phillip.raffeck@....de> Subject: Re: [PATCH v5 15/15] tty: serial: 8250: Merge duplicate conditions On Wed, 2016-01-13 at 17:39 +0100, Anton Wuerfel wrote: > This patch refactors a switch case statement by merging an if > condition > in the default case into an identical condition right after the > switch > statement. > This comes with a slight change in behaviour: If > pci_netmos_9900_numports > returns 0, an additional warning is printed. > + Suggested-by: And I would recommend to put this patch before #13 in the series. > Signed-off-by: Anton Würfel <anton.wuerfel@....de> > Signed-off-by: Phillip Raffeck <phillip.raffeck@....de> > Cc: linux-kernel@...cs.fau.de > --- > drivers/tty/serial/8250/8250_pci.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/8250/8250_pci.c > b/drivers/tty/serial/8250/8250_pci.c > index 1dd607f..50ab301 100644 > --- a/drivers/tty/serial/8250/8250_pci.c > +++ b/drivers/tty/serial/8250/8250_pci.c > @@ -854,8 +854,10 @@ static int pci_netmos_init(struct pci_dev *dev) > } > } > > - if (num_serial == 0) > + if (num_serial == 0) { > + moan_device("unknown NetMos/Mostech device", dev); > return -ENODEV; > + } Yep! However, you forgot to fix switch-case as well. > > return num_serial; > } -- Andy Shevchenko <andriy.shevchenko@...ux.intel.com> Intel Finland Oy
Powered by blists - more mailing lists