libwd/0131-uadk-hisi-remove-a-redefined-macro.patch
Yang Shen ec2f993b84 libwd: backport for uadk from 2.3.31 to 2.3.36
Update some patch for uadk from mainline.
To get more information, please visit the homepage:
https://github.comp/Linaro/uadk

Signed-off-by: Yang Shen <shenyang39@huawei.com>
2022-07-28 15:32:23 +08:00

41 lines
1.1 KiB
Diff

From 24a24c44373d3d2fb185bd7c3c3d8d158b63569e Mon Sep 17 00:00:00 2001
From: Yang Shen <shenyang39@huawei.com>
Date: Fri, 1 Jul 2022 11:01:07 +0800
Subject: [PATCH 144/183] uadk/hisi - remove a redefined macro
Macro 'offsetof' has been defined in 'stddef.h'. So remove the
redefined one in 'hisi_qm_udrv.h'.
Signed-off-by: Yang Shen <shenyang39@huawei.com>
---
include/hisi_qm_udrv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hisi_qm_udrv.h b/include/hisi_qm_udrv.h
index 0ea17c6..88758ac 100644
--- a/include/hisi_qm_udrv.h
+++ b/include/hisi_qm_udrv.h
@@ -5,6 +5,7 @@
#define __HZIP_DRV_H__
#include <stdbool.h>
+#include <stddef.h>
#include <pthread.h>
#include <linux/types.h>
@@ -29,10 +30,9 @@ extern "C" {
#define BYTE_BITS 8
#define BYTE_BITS_SHIFT 3
-#define __offsetof(t, m) ((size_t)(uintptr_t)&((t *)0)->m)
#define container_of(ptr, type, member) ({ \
typeof(((type *)0)->member)(*__mptr) = (ptr); \
- (type *)((char *)__mptr - __offsetof(type, member)); })
+ (type *)((char *)__mptr - offsetof(type, member)); })
enum hisi_qm_sgl_copy_dir {
COPY_SGL_TO_PBUFF,
--
2.27.0