From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>,
kernel-janitors@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [08/15] powerpc/iommu: use permission-specific DEVICE_ATTR variants
Date: Fri, 1 Sep 2017 23:29:45 +1000 (AEST) [thread overview]
Message-ID: <3xkKpy0Lxrz9t2d@ozlabs.org> (raw)
In-Reply-To: <1477769829-22230-9-git-send-email-Julia.Lawall@lip6.fr>
On Sat, 2016-10-29 at 19:37:02 UTC, Julia Lawall wrote:
> Use DEVICE_ATTR_RW for read-write attributes. This simplifies the
> source code, improves readbility, and reduces the chance of
> inconsistencies.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @rw@
> declarer name DEVICE_ATTR;
> identifier x,x_show,x_store;
> @@
>
> DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
>
> @script:ocaml@
> x << rw.x;
> x_show << rw.x_show;
> x_store << rw.x_store;
> @@
>
> if not (x^"_show" = x_show && x^"_store" = x_store)
> then Coccilib.include_match false
>
> @@
> declarer name DEVICE_ATTR_RW;
> identifier rw.x,rw.x_show,rw.x_store;
> @@
>
> - DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
> + DEVICE_ATTR_RW(x);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/8a7aef2cb3dafd2e8560750f4e5ad2
cheers
prev parent reply other threads:[~2017-09-01 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-29 19:36 [PATCH 00/15] use permission-specific DEVICE_ATTR variants Julia Lawall
2016-10-29 19:37 ` [PATCH 08/15] powerpc/iommu: " Julia Lawall
2016-10-31 6:06 ` Michael Ellerman
2017-09-01 13:29 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3xkKpy0Lxrz9t2d@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=Julia.Lawall@lip6.fr \
--cc=benh@kernel.crashing.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).