From patchwork Tue May 24 06:28:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9132835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A9B26075E for ; Tue, 24 May 2016 06:30:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FB962823B for ; Tue, 24 May 2016 06:30:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72E7B2828D; Tue, 24 May 2016 06:30:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B2882823B for ; Tue, 24 May 2016 06:30:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b55pf-0007TN-QM; Tue, 24 May 2016 06:28:47 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b55pc-0007Rl-GY for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 06:28:45 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O7O005OW4N7ZF90@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 07:28:19 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-25-5743f4821923 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 33.83.05254.284F3475; Tue, 24 May 2016 07:28:18 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O7O00BQ04N2WW40@eusync4.samsung.com>; Tue, 24 May 2016 07:28:18 +0100 (BST) From: Krzysztof Kozlowski To: Russell King , Stefano Stabellini , Catalin Marinas , Will Deacon , Joerg Roedel , Konrad Rzeszutek Wilk , Andrew Morton , Marek Szyprowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org Subject: [PATCH 1/4] dma-mapping: Constify attrs passed to dma_get_attr Date: Tue, 24 May 2016 08:28:07 +0200 Message-id: <1464071290-15948-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1464071290-15948-1-git-send-email-k.kozlowski@samsung.com> References: <1464071290-15948-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsVy+t/xa7pNX5zDDbZPNbeYs34Nm8XGGetZ Ld4v62G0WLDf2qJz9gZ2i9cvDC2WLX7KaLHp8TVWi8u75rBZHJq6l9Fi7ZG77Bar18VbvPx4 gsXi+5bJTA58Hk8OzmPyWDNvDaPH5WsXmT02repk8zgx4zeLx+Yl9R6Tbyxn9Dj84QqLx8en t1g8+rasYvT4vEkugDuKyyYlNSezLLVI3y6BK+PovamsBXvYKn7Puc3awLictYuRk0NCwETi 2MEFzBC2mMSFe+vZuhi5OIQEljJKnF70hBnCaWSSmPtwCSNIFZuAscTm5UvAqkQEHjJLnJn1 lwUkwSyQKdG5dy47iC0s4C7x5cs+NhCbRUBV4vnZeWDreIHiD9teskOsk5M4eWwyWJxTwEOi 8fQBsDlCQDXTZl9kn8DIu4CRYRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSEh/2cG4+JjV IUYBDkYlHt6AfOdwIdbEsuLK3EOMEhzMSiK8y68DhXhTEiurUovy44tKc1KLDzFKc7AoifPO 3fU+REggPbEkNTs1tSC1CCbLxMEp1cC44mJ4l8mBiRXSr5+8sO+9br5b4Uzkz8O+D1y/mTvK sRasnv6G8dTU6h2Tik/5r+qMWGK3be+32V2fvwsU8ueLLVilGrGjIGb/I5/3P86t8FJvbL1s /V3E6cTdvha1CJey+apeXZFLv7ksvPvWaP2WXbd3+Ijs3SL2+2XI/v8FD55ZXQ9rX77AQIml OCPRUIu5qDgRAOHoC+dlAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_232844_729630_9A161C4A X-CRM114-Status: GOOD ( 15.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The dma_get_attr() does not modify passed dma_attrs so the pointer can point to const data. Signed-off-by: Krzysztof Kozlowski --- include/linux/dma-attrs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h index 5246239a4953..f3c5aeadb100 100644 --- a/include/linux/dma-attrs.h +++ b/include/linux/dma-attrs.h @@ -60,7 +60,8 @@ static inline void dma_set_attr(enum dma_attr attr, struct dma_attrs *attrs) * @attr: attribute to set * @attrs: struct dma_attrs (may be NULL) */ -static inline int dma_get_attr(enum dma_attr attr, struct dma_attrs *attrs) +static inline int dma_get_attr(enum dma_attr attr, + const struct dma_attrs *attrs) { if (attrs == NULL) return 0;