From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v4] usb: typec: tcpm: Migrate workqueue to RT priority for processing events
Date: Thu, 30 Jul 2020 15:34:31 +0300 [thread overview]
Message-ID: <20200730123431.GO883641@kuha.fi.intel.com> (raw)
In-Reply-To: <20200730072531.3171984-1-badhri@google.com>
Hi,
One more nitpick below...
On Thu, Jul 30, 2020 at 12:25:31AM -0700, Badhri Jagan Sridharan wrote:
> @@ -4786,10 +4807,28 @@ static int devm_tcpm_psy_register(struct tcpm_port *port)
> return PTR_ERR_OR_ZERO(port->psy);
> }
>
> +static enum hrtimer_restart state_machine_timer_handler(struct hrtimer *timer)
> +{
> + struct tcpm_port *port = container_of(timer, struct tcpm_port, state_machine_timer);
> +
> + kthread_queue_work(port->wq, &port->state_machine);
> + return HRTIMER_NORESTART;
> +}
> +
> +static enum hrtimer_restart vdm_state_machine_timer_handler(struct hrtimer *timer)
> +{
> + struct tcpm_port *port = container_of(timer, struct tcpm_port, vdm_state_machine_timer);
> +
> + kthread_queue_work(port->wq, &port->vdm_state_machine);
> + return HRTIMER_NORESTART;
> +}
> +
> struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
> {
> struct tcpm_port *port;
> int err;
> + /* Priority just lower than default irq thread priority */
> + struct sched_param param = {.sched_priority = (MAX_USER_RT_PRIO / 2) + 1,};
Move that outside the function and constify it:
static const struct sched_param param {
.shed_priority = (MAX_USER_RT_PRIO / 2) + 1,
};
> if (!dev || !tcpc ||
> !tcpc->get_vbus || !tcpc->set_cc || !tcpc->get_cc ||
thanks,
--
heikki
next prev parent reply other threads:[~2020-07-30 12:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 7:25 Badhri Jagan Sridharan
2020-07-30 12:34 ` Heikki Krogerus [this message]
2020-07-30 16:05 ` Guenter Roeck
2020-07-31 6:59 ` Badhri Jagan Sridharan
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=20200730123431.GO883641@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.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®