* [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol
@ 2024-03-09 22:45 Randy Dunlap
2024-03-10 0:34 ` Michael Büsch
2024-03-12 15:33 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2024-03-09 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Ying Sun, Michael Büsch, linux-wireless,
Kalle Valo
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]
Reported-by: Ying Sun <sunying@isrc.iscas.ac.cn>
Link: https://lore.kernel.org/lkml/4e8525fe.607e2.18a8ddfdce8.Coremail.sunying@isrc.iscas.ac.cn/
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Michael Büsch <m@bues.ch>
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo <kvalo@kernel.org>
---
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(-)
diff -- a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
--- 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);
diff -- a/drivers/ssb/main.c b/drivers/ssb/main.c
--- 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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol
2024-03-09 22:45 [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol Randy Dunlap
@ 2024-03-10 0:34 ` Michael Büsch
2024-03-12 15:33 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Michael Büsch @ 2024-03-10 0:34 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel, Ying Sun, linux-wireless, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
On Sat, 9 Mar 2024 14:45:38 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:
> -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
> --- 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;
> }
>
Acked-by: Michael Büsch <m@bues.ch>
--
Michael Büsch
https://bues.ch/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol
2024-03-09 22:45 [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol Randy Dunlap
2024-03-10 0:34 ` Michael Büsch
@ 2024-03-12 15:33 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-03-12 15:33 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Randy Dunlap, Ying Sun, Michael Büsch,
linux-wireless
Randy Dunlap <rdunlap@infradead.org> wrote:
> 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]
>
> Reported-by: Ying Sun <sunying@isrc.iscas.ac.cn>
> Link: https://lore.kernel.org/lkml/4e8525fe.607e2.18a8ddfdce8.Coremail.sunying@isrc.iscas.ac.cn/
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Michael Büsch <m@bues.ch>
> Cc: linux-wireless@vger.kernel.org
> Cc: Kalle Valo <kvalo@kernel.org>
> Acked-by: Michael Büsch <m@bues.ch>
Patch applied to wireless-next.git, thanks.
e27b02e23a70 ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240309224540.22682-1-rdunlap@infradead.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-12 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09 22:45 [PATCH] ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol Randy Dunlap
2024-03-10 0:34 ` Michael Büsch
2024-03-12 15:33 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox