From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Guenter Roeck <groeck@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] typec: tcpm: Fix a msecs vs jiffies bug
Date: Thu, 07 Jun 2018 13:25:34 +0000 [thread overview]
Message-ID: <20180607132534.GD17155@kuha.fi.intel.com> (raw)
In-Reply-To: <20180607131714.hjpd7xdhcpzntkob@kili.mountain>
On Thu, Jun 07, 2018 at 04:17:14PM +0300, Dan Carpenter wrote:
> The tcpm_set_state() function take msecs not jiffies.
>
> Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
> index 8a201dd53d36..0dfd755020f4 100644
> --- a/drivers/usb/typec/tcpm.c
> +++ b/drivers/usb/typec/tcpm.c
> @@ -3043,7 +3043,8 @@ static void run_state_machine(struct tcpm_port *port)
> tcpm_port_is_sink(port) &&
> time_is_after_jiffies(port->delayed_runtime)) {
> tcpm_set_state(port, SNK_DISCOVERY,
> - port->delayed_runtime - jiffies);
> + jiffies_to_msecs(port->delayed_runtime -
> + jiffies));
> break;
> }
> tcpm_set_state(port, unattached_state(port), 0);
--
heikki
next prev parent reply other threads:[~2018-06-07 13:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 13:17 [PATCH] typec: tcpm: Fix a msecs vs jiffies bug Dan Carpenter
2018-06-07 13:25 ` Heikki Krogerus [this message]
2018-06-08 6:13 ` Guenter Roeck
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=20180607132534.GD17155@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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