lkml.org 
[lkml]   [2020]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] usb: typec: tcpm: Migrate workqueue to RT priority for processing events
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

\
 
 \ /
  Last update: 2020-07-30 14:35    [W:0.072 / U:9.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site