From patchwork Mon Oct 19 12:19:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 1384240 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=M0cnipII; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CFG7G4VHsz9sSG for ; Mon, 19 Oct 2020 23:20:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6FE5A81F7C; Mon, 19 Oct 2020 14:20:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="M0cnipII"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB692821A4; Mon, 19 Oct 2020 14:20:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MIME_BASE64_TEXT,RDNS_NONE,SPF_HELO_NONE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by phobos.denx.de (Postfix) with ESMTP id 2F98981B79 for ; Mon, 19 Oct 2020 14:20:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chunfeng.yun@mediatek.com X-UUID: ed4002bc8cb1461b926708f6ca92a74f-20201019 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=My9bucV90s6wsAhVen/yanQnYBH/Hj8pK+GIanYQwTo=; b=M0cnipIIK/yn57nh4jR9x8ebbU3W09/TC3scqWi2CeZGH7j9ja0uJNkcJnyRwD3KquMqbz6MNNeEfblrDsHGGdzBZUOeLz4gNLBU0cqF439bx8kJTL6NHfEQYtKXmOnPjSzR7xEDo0i/YpLC76XALceJD8mn0LxHX+bChNORxK4=; X-UUID: ed4002bc8cb1461b926708f6ca92a74f-20201019 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1126294036; Mon, 19 Oct 2020 20:20:08 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 19 Oct 2020 20:20:05 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 19 Oct 2020 20:20:05 +0800 From: Chunfeng Yun To: Marek Vasut , Lukasz Majewski CC: Mingming lee , Ryder Lee , Weijie Gao , Chunfeng Yun , GSS_MTK_Uboot_upstream , Bin Meng , , Frank Wunderlich Subject: [PATCH next] usb: mtu3: fix build error caused by dev_xxx() Date: Mon, 19 Oct 2020 20:19:58 +0800 Message-ID: <1603109998-7258-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-TM-SNTS-SMTP: FC0B8E15E5FF16040910093E8BBF0483FACFAF6EFF7A69212ECB70360FAF40272000:8 X-MTK: N X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Due to the following to patches: 4a1989c0bc77 ("dm: Don't undefine dev_xxx macros") 69dae8902b16 ("linux/compat.h: Remove redefinition of dev_xxx macros") Need include device_compat.h and no need use __maybe_unused anymore to fix unused variable warning Signed-off-by: Chunfeng Yun --- Please squash in: ab703ebb1cc0 ("usb: add MediaTek USB3 DRD driver") in u-boot-usb/next Sorry for inconvenience --- drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_gadget.c | 4 ++-- drivers/usb/mtu3/mtu3_plat.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h index a51251c661..8a7ae83ee9 100644 --- a/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c index c981407b29..027b7e6111 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; - __maybe_unused struct mtu3 *mtu = mep->mtu; + 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); - __maybe_unused struct mtu3 *mtu = mep->mtu; + struct mtu3 *mtu = mep->mtu; struct mtu3_request *mreq; unsigned long flags = 0; int ret = 0; diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 24ffdb360a..3795e695e8 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -347,7 +347,8 @@ static int mtu3_glue_bind(struct udevice *parent) ret = device_bind_driver_to_node(parent, driver, name, node, &dev); if (ret) - dev_err("%s: not able to bind usb device mode\n", __func__); + dev_err(parent, "%s: not able to bind usb device mode\n", + __func__); return ret; }