Received: by 10.192.165.148 with SMTP id m20csp30151imm; Thu, 19 Apr 2018 15:25:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/s0ZGLOBEwK3Hu0hVyjh2t9+BsyxPymJvROMNE14m69CgXzyZTnrR6BKI99hR9UBmIrBnJ X-Received: by 10.99.120.202 with SMTP id t193mr6491690pgc.255.1524176719036; Thu, 19 Apr 2018 15:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524176719; cv=none; d=google.com; s=arc-20160816; b=qx7xL83eYJx82t/K1iMRsr8zyg3TVAFdSN4HZaGGrUkt5YMes5ogywe6MZ7WV3xQ3l 5iYn1dPgmLzX53yvZ7yl889R5w7eey4qM68amn/wvdLqndr3oQHM7PB+7+d7A2wZhkFo OZg4Fuzu0p4KlSTUavNkUctp8kHeAD0H5BGRfNOniGpwNu2aHjfYbsV/fs994lApsCdM 1iQ0irmnTgNaq7aQ9vKuwcX2Z8J3yJ9IaGfrY+can1YZTmEcLgqzjVxyNp+q/DwYCFJl CuWVcRGN7vpTG9MsdJzBJxGYTfCoz/pomcIh1gHUuZwHqbNZbXn4bXbX2/9i0rBjSIk5 uvEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dmarc-filter:arc-authentication-results; bh=vcKM3FLGQflfbmSKpgXz8C5W3oEeoEcs6DX2TDtJeV4=; b=QjArgFugFuv6AVR4b6B+7JRKcN1uYb9ol8lXwN2j6ZdCIRX+vRHgb2MEnMICbMZdBg NbmlzbXxE/wVGWdXsDe0AekgfYxuhEc3X3nxPH/6EVbNt7q28Q5uuhan0jXer/8+meUd 4GRrpAORTPhQLJ17mviA+2ahnIw6nFdALI17bktrhpIehSj8AN7trPGXCcyc+ZSsTbkB bskfEqdnVpbp7Xknzb74HvwcFRibOGWulFC+VAJTUgP3/f/ydlnNS7qZFaKUeHCXHLf3 HdMF/8NTvXHVN6f73sQIJNBHCjavQFaDwI0/1xyVkC/vEed271wRIHJIraO5lqoL79YA mxrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h89-v6si4472757pld.48.2018.04.19.15.25.03; Thu, 19 Apr 2018 15:25:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbeDSWXv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 19 Apr 2018 18:23:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:44582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753505AbeDSWXu (ORCPT ); Thu, 19 Apr 2018 18:23:50 -0400 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A26C9204EF; Thu, 19 Apr 2018 22:23:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A26C9204EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sboyd@kernel.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Wolfram Sang From: Stephen Boyd In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Cc: linux-kernel@vger.kernel.org References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Message-ID: <152417662884.46528.2642186598358773095@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH 00/61] tree-wide: simplify getting .drvdata Date: Thu, 19 Apr 2018 15:23:48 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (Dropping the bazillion lists) Quoting Wolfram Sang (2018-04-19 07:05:30) > > Here is the cocci-script I created (after 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?