Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1405873

[PATCH 1/4] dma-mapping: Constify attrs passed to dma_get_attr

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject [PATCH 1/4] dma-mapping: Constify attrs passed to dma_get_attr
Date 2016-05-24 08:30 +0200
Message-ID <rCe0O-89R-19@gated-at.bofh.it> (permalink)
References <rCe0N-89R-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The dma_get_attr() does not modify passed dma_attrs so the pointer can
point to const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 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;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
  [PATCH 3/4] arm64: dma-mapping: Constify attrs passed to internal  functions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
  [PATCH 2/4] ARM: dma-mapping: Constify attrs passed to internal  functions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
    Re: [PATCH 2/4] ARM: dma-mapping: Constify attrs passed to internal  functions Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-05-24 10:40 +0200
  [PATCH 1/4] dma-mapping: Constify attrs passed to dma_get_attr Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
  [RFC 4/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
  Re: [PATCH 0/4] dma-mapping: Constify dma_attrs Christoph Hellwig <hch@infradead.org> - 2016-05-24 11:20 +0200
    Re: [PATCH 0/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-25 14:40 +0200

csiph-web