* [PATCH] usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function
@ 2023-03-19 15:59 Tom Rix
2023-03-19 18:24 ` Herve Codina
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-19 15:59 UTC (permalink / raw)
To: herve.codina, gregkh, nathan, ndesaulniers
Cc: linux-renesas-soc, linux-usb, linux-kernel, llvm, Tom Rix
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.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/usb/gadget/udc/renesas_usbf.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/usb/gadget/udc/renesas_usbf.c b/drivers/usb/gadget/udc/renesas_usbf.c
index cb23e62e8a87..84ac9fe4ce7f 100644
--- a/drivers/usb/gadget/udc/renesas_usbf.c
+++ b/drivers/usb/gadget/udc/renesas_usbf.c
@@ -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;
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function
2023-03-19 15:59 [PATCH] usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function Tom Rix
@ 2023-03-19 18:24 ` Herve Codina
0 siblings, 0 replies; 2+ messages in thread
From: Herve Codina @ 2023-03-19 18:24 UTC (permalink / raw)
To: Tom Rix
Cc: gregkh, nathan, ndesaulniers, linux-renesas-soc, linux-usb,
linux-kernel, llvm
Hi Tom,
On Sun, 19 Mar 2023 11:59:10 -0400
Tom Rix <trix@redhat.com> 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.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/usb/gadget/udc/renesas_usbf.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/renesas_usbf.c b/drivers/usb/gadget/udc/renesas_usbf.c
> index cb23e62e8a87..84ac9fe4ce7f 100644
> --- a/drivers/usb/gadget/udc/renesas_usbf.c
> +++ b/drivers/usb/gadget/udc/renesas_usbf.c
> @@ -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;
Yes, indeed.
Acked-by: Herve Codina <herve.codina@bootlin.com>
Thanks for the patch.
Regards,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-19 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 15:59 [PATCH] usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function Tom Rix
2023-03-19 18:24 ` Herve Codina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).