From: Jason Yan <yanaijie@huawei.com>
To: <linux@roeck-us.net>, <heikki.krogerus@linux.intel.com>,
<gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Jason Yan <yanaijie@huawei.com>
Subject: [PATCH] usb: typec: tcpm: remove tcpm_altmode_ops and associations
Date: Thu, 9 Apr 2020 16:51:17 +0800 [thread overview]
Message-ID: <20200409085117.45819-1-yanaijie@huawei.com> (raw)
Fix the following gcc warning:
drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’
defined but not used [-Wunused-const-variable=]
static const struct typec_altmode_ops tcpm_altmode_ops = {
^~~~~~~~~~~~~~~~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/usb/typec/tcpm/tcpm.c | 51 -----------------------------------
1 file changed, 51 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index de3576e6530a..0fcb1023bdbe 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -1503,57 +1503,6 @@ static int tcpm_validate_caps(struct tcpm_port *port, const u32 *pdo,
return 0;
}
-static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo)
-{
- struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
- u32 header;
-
- mutex_lock(&port->lock);
- header = VDO(altmode->svid, vdo ? 2 : 1, CMD_ENTER_MODE);
- header |= VDO_OPOS(altmode->mode);
-
- tcpm_queue_vdm(port, header, vdo, vdo ? 1 : 0);
- mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
- mutex_unlock(&port->lock);
-
- return 0;
-}
-
-static int tcpm_altmode_exit(struct typec_altmode *altmode)
-{
- struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
- u32 header;
-
- mutex_lock(&port->lock);
- header = VDO(altmode->svid, 1, CMD_EXIT_MODE);
- header |= VDO_OPOS(altmode->mode);
-
- tcpm_queue_vdm(port, header, NULL, 0);
- mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
- mutex_unlock(&port->lock);
-
- return 0;
-}
-
-static int tcpm_altmode_vdm(struct typec_altmode *altmode,
- u32 header, const u32 *data, int count)
-{
- struct tcpm_port *port = typec_altmode_get_drvdata(altmode);
-
- mutex_lock(&port->lock);
- tcpm_queue_vdm(port, header, data, count - 1);
- mod_delayed_work(port->wq, &port->vdm_state_machine, 0);
- mutex_unlock(&port->lock);
-
- return 0;
-}
-
-static const struct typec_altmode_ops tcpm_altmode_ops = {
- .enter = tcpm_altmode_enter,
- .exit = tcpm_altmode_exit,
- .vdm = tcpm_altmode_vdm,
-};
-
/*
* PD (data, control) command handling functions
*/
--
2.17.2
next reply other threads:[~2020-04-09 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 8:51 Jason Yan [this message]
2020-04-14 12:10 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200409085117.45819-1-yanaijie@huawei.com \
--to=yanaijie@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®