lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Apr 2018 15:23:48 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/61] tree-wide: simplify getting .drvdata

(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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ