Skip to contentSkip to conversation

usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function

PATCH In review Tom Rix 2 participants 2 messages Mar 19, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function

clang with W=1 reports drivers/usb/gadget/udc/renesas_usbf.c:548:20: error: unused function
'usbf_ep_dma_reg_clrset' [-Werror,-Wunused-function]
static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset,

                   ^

This function is not used, so remove it.

---
 drivers/usb/gadget/udc/renesas_usbf.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/usb/gadget/udc/renesas_usbf.c +0 -11
index cb23e62e8a87..84ac9fe4ce7f 100644
@@ -545,17 +545,6 @@ static inline void usbf_ep_dma_reg_bitclr(struct usbf_ep *ep, uint offset,
 	usbf_ep_dma_reg_writel(ep, offset, tmp);
 }
 
-static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset,
-					  u32 clr, u32 set)
-{
-	u32 tmp;
-
-	tmp = usbf_ep_dma_reg_readl(ep, offset);
-	tmp &= ~clr;
-	tmp |= set;
-	usbf_ep_dma_reg_writel(ep, offset, tmp);
-}
-
 static void usbf_ep0_send_null(struct usbf_ep *ep0, bool is_data1)
 {
 	u32 set;
Signature · 1 line
2.27.0
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Tom,

Quoted 24 lines · On Sun, 19 Mar 2023 11:59:10 -0400 Tom Rix <[email protected]> wrote:

clang with W=1 reports drivers/usb/gadget/udc/renesas_usbf.c:548:20: error: unused function
'usbf_ep_dma_reg_clrset' [-Werror,-Wunused-function]
static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset,

                   ^

This function is not used, so remove it.

---
 drivers/usb/gadget/udc/renesas_usbf.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/usb/gadget/udc/renesas_usbf.c +0 -4
index cb23e62e8a87..84ac9fe4ce7f 100644
@@ -545,17 +545,6 @@ static inline void usbf_ep_dma_reg_bitclr(struct usbf_ep *ep, uint offset,
 	usbf_ep_dma_reg_writel(ep, offset, tmp);
 }
 
-static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset,
-					  u32 clr, u32 set)
-{
-	u32 tmp;

drivers/usb/gadget/udc/renesas_usbf.c static inline void usbf_ep_dma_reg_bitclr(struct usbf_ep *ep, uint offset, · line 550

Quoted 10 lines
drivers/usb/gadget/udc/renesas_usbf.c +0 -7
-
-	tmp = usbf_ep_dma_reg_readl(ep, offset);
-	tmp &= ~clr;
-	tmp |= set;
-	usbf_ep_dma_reg_writel(ep, offset, tmp);
-}
-
 static void usbf_ep0_send_null(struct usbf_ep *ep0, bool is_data1)
 {
 	u32 set;

Yes, indeed.

Thanks for the patch.
Regards,
Hervé

Signature · 3 lines
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com