Skip to contentSkip to conversation

ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol

PATCH In review Randy Dunlap 3 participants 3 messages Mar 9, 2024 – Mar 12, 2024 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol

CONFIG_SSB_DEBUG is used in one header file and nowhere else, so remove it and the now-empty inline function that contained it. Also remove the call to the empty inline function. The empty "default:" case is kept to prevent 2 compiler warnings:

drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_PCMCIA' not handled in switch [-Wswitch] drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_SDIO' not handled in switch [-Wswitch]

---
This Closes only 1 of the 3 issues reported in the Link.

 drivers/ssb/main.c      |    1 -
 include/linux/ssb/ssb.h |    8 --------
 2 files changed, 9 deletions(-)
include/linux/ssb/ssb.h +0 -8
diff -- a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
@@ -621,14 +621,6 @@ extern u32 ssb_dma_translation(struct ss
 #define SSB_DMA_TRANSLATION_MASK	0xC0000000
 #define SSB_DMA_TRANSLATION_SHIFT	30
 
-static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev)
-{
-#ifdef CONFIG_SSB_DEBUG
-	printk(KERN_ERR "SSB: BUG! Calling DMA API for "
-	       "unsupported bustype %d\n", dev->bus->bustype);
-#endif /* DEBUG */
-}
-
 #ifdef CONFIG_SSB_PCIHOST
 /* PCI-host wrapper driver */
 extern int ssb_pcihost_register(struct pci_driver *driver);
drivers/ssb/main.c +0 -1
diff -- a/drivers/ssb/main.c b/drivers/ssb/main.c
@@ -1144,7 +1144,6 @@ u32 ssb_dma_translation(struct ssb_devic
 				return SSB_PCI_DMA;
 		}
 	default:
-		__ssb_dma_not_implemented(dev);
 	}
 	return 0;
 }
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · On Sat, 9 Mar 2024 14:45:38 -0800 Randy Dunlap <[email protected]> wrote:
include/linux/ssb/ssb.h +0 -8
-static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev)
-{
-#ifdef CONFIG_SSB_DEBUG
-	printk(KERN_ERR "SSB: BUG! Calling DMA API for "
-	       "unsupported bustype %d\n", dev->bus->bustype);
-#endif /* DEBUG */
-}
-
 #ifdef CONFIG_SSB_PCIHOST
 /* PCI-host wrapper driver */
 extern int ssb_pcihost_register(struct pci_driver *driver);

diff -- a/drivers/ssb/main.c b/drivers/ssb/main.c

drivers/ssb/main.c u32 ssb_dma_translation(struct ssb_devic · line 1149

Quoted 7 lines
drivers/ssb/main.c +0 -1
@@ -1144,7 +1144,6 @@ u32 ssb_dma_translation(struct ssb_devic
 				return SSB_PCI_DMA;
 		}
 	default:
-		__ssb_dma_not_implemented(dev);
 	}
 	return 0;
 }
Signature · 2 lines
Michael Büsch
https://bues.ch/
#2 lore raw
In reply to Randy Dunlap
Quoted 8 lines · Randy Dunlap

CONFIG_SSB_DEBUG is used in one header file and nowhere else, so remove it and the now-empty inline function that contained it. Also remove the call to the empty inline function. The empty "default:" case is kept to prevent 2 compiler warnings:

drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_PCMCIA' not handled in switch [-Wswitch] drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_SDIO' not handled in switch [-Wswitch]

Quoted 7 lines

Patch applied to wireless-next.git, thanks.

e27b02e23a70 ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches