Blame libnvme-1.0-rc5-ccan_headers.patch

Tomas Bzatek 7b2638
From d43a9f73ae4980606a6cbfa1777486d9dcc495b2 Mon Sep 17 00:00:00 2001
Tomas Bzatek 7b2638
From: Martin Belanger <martin.belanger@dell.com>
Tomas Bzatek 7b2638
Date: Mon, 28 Feb 2022 11:26:07 -0500
Tomas Bzatek 7b2638
Subject: [PATCH] Move ccan definitions out of public headers.
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Tomas Bzatek 7b2638
---
Tomas Bzatek 7b2638
 src/nvme/util.c | 6 ++++++
Tomas Bzatek 7b2638
 src/nvme/util.h | 7 +------
Tomas Bzatek 7b2638
 2 files changed, 7 insertions(+), 6 deletions(-)
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
diff --git a/src/nvme/util.c b/src/nvme/util.c
Tomas Bzatek 7b2638
index 7d8a40b2..c95f16b3 100644
Tomas Bzatek 7b2638
--- a/src/nvme/util.c
Tomas Bzatek 7b2638
+++ b/src/nvme/util.c
Tomas Bzatek 7b2638
@@ -759,3 +759,9 @@ size_t get_entity_version(char *buffer, size_t bufsz)
Tomas Bzatek 7b2638
 
Tomas Bzatek 7b2638
 	return num_bytes;
Tomas Bzatek 7b2638
 }
Tomas Bzatek 7b2638
+
Tomas Bzatek 7b2638
+struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p)
Tomas Bzatek 7b2638
+{
Tomas Bzatek 7b2638
+	return (struct nvmf_ext_attr *)
Tomas Bzatek 7b2638
+		((uintptr_t)p + (ptrdiff_t)nvmf_exat_size(le16_to_cpu(p->exatlen)));
Tomas Bzatek 7b2638
+}
Tomas Bzatek 7b2638
diff --git a/src/nvme/util.h b/src/nvme/util.h
Tomas Bzatek 7b2638
index f1f6fcb6..f034c1b7 100644
Tomas Bzatek 7b2638
--- a/src/nvme/util.h
Tomas Bzatek 7b2638
+++ b/src/nvme/util.h
Tomas Bzatek 7b2638
@@ -10,7 +10,6 @@
Tomas Bzatek 7b2638
 #define _LIBNVME_UTIL_H
Tomas Bzatek 7b2638
 
Tomas Bzatek 7b2638
 #include "types.h"
Tomas Bzatek 7b2638
-#include <ccan/endian/endian.h>
Tomas Bzatek 7b2638
 
Tomas Bzatek 7b2638
 /**
Tomas Bzatek 7b2638
  * DOC: util.h
Tomas Bzatek 7b2638
@@ -548,10 +547,6 @@ static inline __u16 nvmf_exat_size(size_t val_len)
Tomas Bzatek 7b2638
  *
Tomas Bzatek 7b2638
  * Return: Pointer to the next element in the array.
Tomas Bzatek 7b2638
  */
Tomas Bzatek 7b2638
-static inline struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p)
Tomas Bzatek 7b2638
-{
Tomas Bzatek 7b2638
-	return (struct nvmf_ext_attr *)
Tomas Bzatek 7b2638
-		((uintptr_t)p + (ptrdiff_t)nvmf_exat_size(le16_to_cpu(p->exatlen)));
Tomas Bzatek 7b2638
-}
Tomas Bzatek 7b2638
+struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p);
Tomas Bzatek 7b2638
 
Tomas Bzatek 7b2638
 #endif /* _LIBNVME_UTIL_H */