Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firewire: ohci: move runtime debug facility out of #ifdef

CONFIG_FIREWIRE_OHCI_DEBUG could have been exposed to kernel tweakers
if CONFIG_EXPERT was set. But in hindsight, this stuff is far too
useful to omit it. So get rid of two #else branches that are only
going to bitrot otherwise.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+1 -24
-5
drivers/firewire/Kconfig
··· 28 28 To compile this driver as a module, say M here: The module will be 29 29 called firewire-ohci. 30 30 31 - config FIREWIRE_OHCI_DEBUG 32 - bool 33 - depends on FIREWIRE_OHCI 34 - default y 35 - 36 31 config FIREWIRE_SBP2 37 32 tristate "Storage devices (SBP-2 protocol)" 38 33 depends on FIREWIRE && SCSI
+1 -19
drivers/firewire/ohci.c
··· 334 334 #define OHCI_PARAM_DEBUG_IRQS 4 335 335 #define OHCI_PARAM_DEBUG_BUSRESETS 8 /* only effective before chip init */ 336 336 337 - #ifdef CONFIG_FIREWIRE_OHCI_DEBUG 338 - 339 337 static int param_debug; 340 338 module_param_named(debug, param_debug, int, 0644); 341 339 MODULE_PARM_DESC(debug, "Verbose logging (default = 0" ··· 513 515 tcodes[tcode], specific); 514 516 } 515 517 } 516 - 517 - #else 518 - 519 - #define param_debug 0 520 - static inline void log_irqs(struct fw_ohci *ohci, u32 evt) {} 521 - static inline void log_selfids(struct fw_ohci *ohci, int generation, int self_id_count) {} 522 - static inline void log_ar_at_event(struct fw_ohci *ohci, char dir, int speed, u32 *header, int evt) {} 523 - 524 - #endif /* CONFIG_FIREWIRE_OHCI_DEBUG */ 525 518 526 519 static inline void reg_write(const struct fw_ohci *ohci, int offset, u32 data) 527 520 { ··· 1625 1636 u32 ctl; 1626 1637 1627 1638 ctl = reg_read(ohci, CONTROL_SET(regs)); 1628 - if (ctl & CONTEXT_DEAD) { 1629 - #ifdef CONFIG_FIREWIRE_OHCI_DEBUG 1639 + if (ctl & CONTEXT_DEAD) 1630 1640 dev_err(ohci->card.device, 1631 1641 "DMA context %s has stopped, error code: %s\n", 1632 1642 name, evts[ctl & 0x1f]); 1633 - #else 1634 - dev_err(ohci->card.device, 1635 - "DMA context %s has stopped, error code: %#x\n", 1636 - name, ctl & 0x1f); 1637 - #endif 1638 - } 1639 1643 } 1640 1644 1641 1645 static void handle_dead_contexts(struct fw_ohci *ohci)