diff mbox series

usb: musb-new: Fix unused function warnings from clang

Message ID 20200604200924.5998-1-trini@konsulko.com
State New
Headers show
Series usb: musb-new: Fix unused function warnings from clang | expand

Commit Message

Tom Rini June 4, 2020, 8:09 p.m. UTC
The functions dsps_readb and dsps_writeb are only used by code that is
under a !__UBOOT__ guard today.  Add that guard around these functions
as well to avoid the warning.

Cc: Marek Vasut <marex at denx.de>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 drivers/usb/musb-new/musb_dsps.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marek Vasut June 4, 2020, 8:11 p.m. UTC | #1
On 6/4/20 10:09 PM, Tom Rini wrote:
> The functions dsps_readb and dsps_writeb are only used by code that is
> under a !__UBOOT__ guard today.  Add that guard around these functions
> as well to avoid the warning.
> 
> Cc: Marek Vasut <marex at denx.de>
> Signed-off-by: Tom Rini <trini at konsulko.com>

Reviewed-by: Marek Vasut <marex at denx.de>
diff mbox series

Patch

diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index eb590885bc53..1d94249c092e 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -42,14 +42,18 @@ 
  * avoid using musb_readx()/musb_writex() as glue layer should not be
  * dependent on musb core layer symbols.
  */
+#ifndef __UBOOT__
 static inline u8 dsps_readb(const void __iomem *addr, unsigned offset)
 	{ return __raw_readb(addr + offset); }
+#endif
 
 static inline u32 dsps_readl(const void __iomem *addr, unsigned offset)
 	{ return __raw_readl(addr + offset); }
 
+#ifndef __UBOOT__
 static inline void dsps_writeb(void __iomem *addr, unsigned offset, u8 data)
 	{ __raw_writeb(data, addr + offset); }
+#endif
 
 static inline void dsps_writel(void __iomem *addr, unsigned offset, u32 data)
 	{ __raw_writel(data, addr + offset); }