lkml.org 
[lkml]   [2019]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] pwm: omap-dmtimer: remove pwmchip in .remove before making it unfunctional
Date
> In the old code (e.g.) mutex_destroy() was called before
> pwmchip_remove(). Between these two calls it is possible that a pwm
> callback is used which tries to grab the mutex.

How do you think about to add a more “imperative mood” for your
change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c#n151


> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -351,6 +351,11 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
> static int pwm_omap_dmtimer_remove(struct platform_device *pdev)
> {
> struct pwm_omap_dmtimer_chip *omap = platform_get_drvdata(pdev);
> + int ret;
> +
> + ret = pwmchip_remove(&omap->chip);
> + if (ret)
> + return ret;
>
> if (pm_runtime_active(&omap->dm_timer_pdev->dev))
> omap->pdata->stop(omap->dm_timer);

How do you think about to use the following statement variant?

+ int ret = pwmchip_remove(&omap->chip);

Regards,
Markus

\
 
 \ /
  Last update: 2019-11-11 14:31    [W:0.111 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site