lkml.org 
[lkml]   [2018]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 00/61] tree-wide: simplify getting .drvdata
Date
(Dropping the bazillion lists)

Quoting Wolfram Sang (2018-04-19 07:05:30)
>
> Here is the cocci-script I created (after <n> iterations by manually checking
> samples):
>
> @@
> struct device* d;
> identifier pdev;
> expression *ptr;
> @@
> (
> - struct platform_device *pdev = to_platform_device(d);
> |
> - struct platform_device *pdev;
> ...
> - pdev = to_platform_device(d);
> )
> <... when != pdev
> - &pdev->dev
> + d
> ...>
>
> ptr =
> - platform_get_drvdata(pdev)
> + dev_get_drvdata(d)
>
> <... when != pdev
> - &pdev->dev
> + d
> ...>
>

Can you throw this into scripts/coccinelle/ so we can have the build
testers run this all the time?

\
 
 \ /
  Last update: 2018-04-20 00:24    [W:0.289 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site