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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 17 Aug 2007 23:05:23 +0200
From:	Jesper Juhl <jesper.juhl@...il.com>
To:	Marcio Saito <marcio@...lades.com>
Cc:	Randolph Bentson <bentson@...eg.seaslug.org>,
	Jiri Slaby <jirislaby@...il.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Jesper Juhl <jesper.juhl@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] Cyclades: Avoid label defined but not used warning

Hi,

I don't like compiler warnings, especially not when they are easy to 
avoid.

Building cyclades driver without CONFIG_PCI currently results in this :

   CC      drivers/char/cyclades.o
 drivers/char/cyclades.c: In function 'cy_init':
 drivers/char/cyclades.c:5488: warning: label 'err_unr' defined but not used

That's easily avoided, with no ill effects by simply moving what's 
under the 'err_unr' label (used from only a single location) inside 
the existing #ifdef - so that's what this patch does.

Compile tested on i386 only. I don't have the hardware to do any 
other testing.

Please consider applying.


Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
---

 drivers/char/cyclades.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 9e0adfe..858bdab 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -5480,13 +5480,13 @@ static int __init cy_init(void)
 #ifdef CONFIG_PCI
 	/* look for pci boards */
 	retval = pci_register_driver(&cy_pci_driver);
-	if (retval && !nboards)
-		goto err_unr;
+	if (retval && !nboards) {
+		tty_unregister_driver(cy_serial_driver);
+		goto err_frtty;
+	}
 #endif
 
 	return 0;
-err_unr:
-	tty_unregister_driver(cy_serial_driver);
 err_frtty:
 	put_tty_driver(cy_serial_driver);
 err:


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ