[{"id":1496423,"web_url":"http://patchwork.ozlabs.org/comment/1496423/","msgid":"<87twbt127x.fsf@concordia.ellerman.id.au>","date":"2016-10-31T06:06:58","subject":"Re: [PATCH 08/15] powerpc/iommu: use permission-specific DEVICE_ATTR\n\tvariants","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Julia Lawall <Julia.Lawall@lip6.fr> writes:\n\n> diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c\n> index 5f202a5..32f18b5 100644\n> --- a/arch/powerpc/kernel/iommu.c\n> +++ b/arch/powerpc/kernel/iommu.c\n> @@ -127,8 +127,7 @@ static ssize_t fail_iommu_store(struct device *dev,\n>  \treturn count;\n>  }\n>  \n> -static DEVICE_ATTR(fail_iommu, S_IRUGO|S_IWUSR, fail_iommu_show,\n> -\t\t   fail_iommu_store);\n> +static DEVICE_ATTR_RW(fail_iommu);\n\nAcked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)\n\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3t6kRz2Nrvz9t2g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 31 Oct 2016 17:07:59 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3t6kRz1VHGzDvfr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 31 Oct 2016 17:07:59 +1100 (AEDT)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3t6kQp2pmMzDvQM\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 31 Oct 2016 17:06:58 +1100 (AEDT)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3t6kQp1yzwz9t15;\n\tMon, 31 Oct 2016 17:06:58 +1100 (AEDT)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Julia Lawall <Julia.Lawall@lip6.fr>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>","Subject":"Re: [PATCH 08/15] powerpc/iommu: use permission-specific DEVICE_ATTR\n\tvariants","In-Reply-To":"<1477769829-22230-9-git-send-email-Julia.Lawall@lip6.fr>","References":"<1477769829-22230-1-git-send-email-Julia.Lawall@lip6.fr>\n\t<1477769829-22230-9-git-send-email-Julia.Lawall@lip6.fr>","User-Agent":"Notmuch/0.21 (https://notmuchmail.org)","Date":"Mon, 31 Oct 2016 17:06:58 +1100","Message-ID":"<87twbt127x.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Paul Mackerras <paulus@samba.org>, kernel-janitors@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1761680,"web_url":"http://patchwork.ozlabs.org/comment/1761680/","msgid":"<3xkKpy0Lxrz9t2d@ozlabs.org>","date":"2017-09-01T13:29:45","subject":"Re: [08/15] powerpc/iommu: use permission-specific DEVICE_ATTR\n\tvariants","submitter":{"id":69509,"url":"http://patchwork.ozlabs.org/api/people/69509/","name":"Michael Ellerman","email":"patch-notifications@ellerman.id.au"},"content":"On Sat, 2016-10-29 at 19:37:02 UTC, Julia Lawall wrote:\n> Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the\n> source code, improves readbility, and reduces the chance of\n> inconsistencies.\n> \n> The semantic patch that makes this change is as follows:\n> (http://coccinelle.lip6.fr/)\n> \n> // <smpl>\n> @rw@\n> declarer name DEVICE_ATTR;\n> identifier x,x_show,x_store;\n> @@\n> \n> DEVICE_ATTR(x, \\(0644\\|S_IRUGO|S_IWUSR\\), x_show, x_store);\n> \n> @script:ocaml@\n> x << rw.x;\n> x_show << rw.x_show;\n> x_store << rw.x_store;\n> @@\n> \n> if not (x^\"_show\" = x_show && x^\"_store\" = x_store)\n> then Coccilib.include_match false\n> \n> @@\n> declarer name DEVICE_ATTR_RW;\n> identifier rw.x,rw.x_show,rw.x_store;\n> @@\n> \n> - DEVICE_ATTR(x, \\(0644\\|S_IRUGO|S_IWUSR\\), x_show, x_store);\n> + DEVICE_ATTR_RW(x);\n> // </smpl>\n> \n> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>\n> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)\n\nApplied to powerpc next, thanks.\n\nhttps://git.kernel.org/powerpc/c/8a7aef2cb3dafd2e8560750f4e5ad2\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkKrn6t7Gz9s7p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 23:31:21 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xkKrn63gmzDqln\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 23:31:21 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xkKpy0vkyzDqfx\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 23:29:46 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1034)\n\tid 3xkKpy0Lxrz9t2d; Fri,  1 Sep 2017 23:29:45 +1000 (AEST)"],"X-powerpc-patch-notification":"thanks","X-powerpc-patch-commit":"8a7aef2cb3dafd2e8560750f4e5ad2cc2d9b1d17","In-Reply-To":"<1477769829-22230-9-git-send-email-Julia.Lawall@lip6.fr>","To":"Julia Lawall <Julia.Lawall@lip6.fr>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>","From":"Michael Ellerman <patch-notifications@ellerman.id.au>","Subject":"Re: [08/15] powerpc/iommu: use permission-specific DEVICE_ATTR\n\tvariants","Message-Id":"<3xkKpy0Lxrz9t2d@ozlabs.org>","Date":"Fri,  1 Sep 2017 23:29:45 +1000 (AEST)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"kernel-janitors@vger.kernel.org, Paul Mackerras <paulus@samba.org>,\n\tlinuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]