aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch
blob: e69a3cf1ff46c0ffc8219260a4cb5e7a580360fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 6cf6f5b9c39dfd0d46f2069c3baeab92ae980367 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Dec 2019 00:58:13 -0800
Subject: [PATCH] Replace u_intXX_t with kernel typedefs

u_intXX_t requires including sys/types.h which might not work in kernel
code, if this header is used in a kernel module

Fixes
| In file included from ufs.c:16:
| In file included from ./ufs.h:9:
| ./scsi_bsg_util.h:131:2: error: unknown type name 'u_int16_t'; did you mean 'uint16_t'?
|         u_int16_t result;
|         ^~~~~~~~~

Upstream-Status: Submitted [https://github.com/westerndigitalcorporation/ufs-utils/pull/23]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 scsi_bsg_util.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scsi_bsg_util.h b/scsi_bsg_util.h
index 3f8a482..497c3ae 100644
--- a/scsi_bsg_util.h
+++ b/scsi_bsg_util.h
@@ -121,15 +121,15 @@ struct ufs_bsg_reply {
 #endif /* SCSI_BSG_UFS_H.*/
 
 struct rpmb_frame {
-	u_int8_t  stuff[196];
-	u_int8_t  key_mac[32];
-	u_int8_t  data[256];
-	u_int8_t  nonce[16];
-	u_int32_t write_counter;
-	u_int16_t addr;
-	u_int16_t block_count;
-	u_int16_t result;
-	u_int16_t req_resp;
+	__u8  stuff[196];
+	__u8  key_mac[32];
+	__u8  data[256];
+	__u8  nonce[16];
+	__u32 write_counter;
+	__u16 addr;
+	__u16 block_count;
+	__u16 result;
+	__u16 req_resp;
 };
 
 #define BSG_REPLY_SZ (sizeof(struct ufs_bsg_reply))
-- 
2.24.1