Skip to contentSkip to conversation

Fix drivers/char/cyclades.c warning with CONFIG_PCI=n

PATCH NAK Gabriel C 2 participants 2 messages Jul 22, 2007 Char and misc drivers

lore
Share & tools
lore

Gabriel C

author
#0 lore raw

PATCH 1/1 Fix drivers/char/cyclades.c warning with CONFIG_PCI=n

Hi,

when CONFIG_PCI is not set I get this warning :

...

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

...

---

drivers/char/cyclades.c +3 -0
index 9e0adfe..1fa0bda 100644
@@ -5485,8 +5485,11 @@ static int __init cy_init(void)
 #endif
 
 	return 0;
+
+#ifdef CONFIG_PCI
 err_unr:
 	tty_unregister_driver(cy_serial_driver);
+#endif
 err_frtty:
 	put_tty_driver(cy_serial_driver);
 err:
#1 lore raw

Gabriel C napsal(a):

Quoted 22 lines

Hi,

when CONFIG_PCI is not set I get this warning :

...

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

...

---

drivers/char/cyclades.c +0 -0
index 9e0adfe..1fa0bda 100644
@@ -5485,8 +5485,11 @@ static int __init cy_init(void)
 #endif

drivers/char/cyclades.c static int __init cy_init(void) · line 5495

Quoted 10 lines
drivers/char/cyclades.c +3 -0
 
 	return 0;
+
+#ifdef CONFIG_PCI
 err_unr:
 	tty_unregister_driver(cy_serial_driver);
+#endif
 err_frtty:
 	put_tty_driver(cy_serial_driver);
 err:

NAK

remove the ifdef at all. pci_register_driver becomes a void function if !CONFIG_PCI. This will get rid of ugly macros inside the code. And Cc akpm.

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University