diff mbox series

[next] usb: mtu3: fix build warning/error

Message ID 1603079211-1901-1-git-send-email-chunfeng.yun@mediatek.com
State Deferred
Delegated to: Tom Rini
Headers show
Series [next] usb: mtu3: fix build warning/error | expand

Commit Message

Chunfeng Yun (云春峰) Oct. 19, 2020, 3:46 a.m. UTC
Fix up the following build warning/error:
1. unused variable 'mtu' in mtu3_gadget_dequeue() and
   mtu3_gadget_ep_set_halt()
2. implicit declaration of function ‘flush_dcache_range’ and
   ‘invalidate_dcache_range’

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_gadget.c | 4 ++--
 drivers/usb/mtu3/mtu3_qmu.c    | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Marek Vasut Oct. 19, 2020, 6:07 a.m. UTC | #1
On 10/19/20 5:46 AM, Chunfeng Yun wrote:
> Fix up the following build warning/error:
> 1. unused variable 'mtu' in mtu3_gadget_dequeue() and
>    mtu3_gadget_ep_set_halt()
> 2. implicit declaration of function ‘flush_dcache_range’ and
>    ‘invalidate_dcache_range’

Which patch of the ones in usb/next do I squash this in ?
Chunfeng Yun (云春峰) Oct. 19, 2020, 9:32 a.m. UTC | #2
On Mon, 2020-10-19 at 08:07 +0200, Marek Vasut wrote:
> On 10/19/20 5:46 AM, Chunfeng Yun wrote:
> > Fix up the following build warning/error:
> > 1. unused variable 'mtu' in mtu3_gadget_dequeue() and
> >    mtu3_gadget_ep_set_halt()
> > 2. implicit declaration of function ‘flush_dcache_range’ and
> >    ‘invalidate_dcache_range’
> 
> Which patch of the ones in usb/next do I squash this in ?

squash in:  ab703ebb1c usb: add MediaTek USB3 DRD driver

Thanks a lot
Marek Vasut Oct. 19, 2020, 10:34 a.m. UTC | #3
On 10/19/20 11:32 AM, Chunfeng Yun wrote:
> On Mon, 2020-10-19 at 08:07 +0200, Marek Vasut wrote:
>> On 10/19/20 5:46 AM, Chunfeng Yun wrote:
>>> Fix up the following build warning/error:
>>> 1. unused variable 'mtu' in mtu3_gadget_dequeue() and
>>>    mtu3_gadget_ep_set_halt()
>>> 2. implicit declaration of function ‘flush_dcache_range’ and
>>>    ‘invalidate_dcache_range’
>>
>> Which patch of the ones in usb/next do I squash this in ?
> 
> squash in:  ab703ebb1c usb: add MediaTek USB3 DRD driver
> 
> Thanks a lot

Build fails:
https://gitlab.denx.de/u-boot/custodians/u-boot-usb/-/pipelines/5036
Chunfeng Yun (云春峰) Oct. 19, 2020, 12:29 p.m. UTC | #4
On Mon, 2020-10-19 at 12:34 +0200, Marek Vasut wrote:
> On 10/19/20 11:32 AM, Chunfeng Yun wrote:
> > On Mon, 2020-10-19 at 08:07 +0200, Marek Vasut wrote:
> >> On 10/19/20 5:46 AM, Chunfeng Yun wrote:
> >>> Fix up the following build warning/error:
> >>> 1. unused variable 'mtu' in mtu3_gadget_dequeue() and
> >>>    mtu3_gadget_ep_set_halt()
> >>> 2. implicit declaration of function ‘flush_dcache_range’ and
> >>>    ‘invalidate_dcache_range’
> >>
> >> Which patch of the ones in usb/next do I squash this in ?
> > 
> > squash in:  ab703ebb1c usb: add MediaTek USB3 DRD driver
> > 
> > Thanks a lot
> 
> Build fails:
> https://gitlab.denx.de/u-boot/custodians/u-boot-usb/-/pipelines/5036

Sorry, the patch is already sent out, thanks
diff mbox series

Patch

diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
index 027b7e6111..c981407b29 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
@@ -306,7 +306,7 @@  static int mtu3_gadget_dequeue(struct usb_ep *ep, struct usb_request *req)
 	struct mtu3_ep *mep = to_mtu3_ep(ep);
 	struct mtu3_request *mreq = to_mtu3_request(req);
 	struct mtu3_request *r;
-	struct mtu3 *mtu = mep->mtu;
+	__maybe_unused struct mtu3 *mtu = mep->mtu;
 	unsigned long flags;
 	int ret = 0;
 
@@ -344,7 +344,7 @@  done:
 static int mtu3_gadget_ep_set_halt(struct usb_ep *ep, int value)
 {
 	struct mtu3_ep *mep = to_mtu3_ep(ep);
-	struct mtu3 *mtu = mep->mtu;
+	__maybe_unused struct mtu3 *mtu = mep->mtu;
 	struct mtu3_request *mreq;
 	unsigned long flags = 0;
 	int ret = 0;
diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
index f602e50c2f..801c2bc416 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -19,6 +19,7 @@ 
  */
 
 #include <asm/cache.h>
+#include <cpu_func.h>
 #include <linux/iopoll.h>
 #include <linux/types.h>