File: fix-warnings.patch

package info (click to toggle)
nvidia-open-gpu-kernel-modules 555.58.02-2
  • links: PTS, VCS
  • area: contrib
  • in suites: experimental
  • size: 89,204 kB
  • sloc: ansic: 1,149,014; cpp: 23,369; sh: 3,639; makefile: 607; python: 315
file content (152 lines) | stat: -rw-r--r-- 4,795 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Author: Andreas Beckmann <anbe@debian.org>
Description: fix warnings during open module build

--- a/kernel-open/nvidia/libspdm_ec.c
+++ b/kernel-open/nvidia/libspdm_ec.c
@@ -33,6 +33,7 @@ static bool lkca_ecdsa_sign(void *ec_con
     return false;
 }
 
+static
 bool libspdm_ec_set_pub_key(void *ec_context, const uint8_t *public_key,
                             size_t public_key_size)
 {
@@ -43,6 +44,7 @@ bool libspdm_ec_set_pub_key(void *ec_con
     return lkca_ec_set_pub_key(ec_context, public_key, public_key_size);
 }
 
+static
 bool libspdm_ec_get_pub_key(void *ec_context, uint8_t *public_key,
                             size_t *public_key_size)
 {
@@ -57,6 +59,7 @@ bool libspdm_ec_get_pub_key(void *ec_con
     return lkca_ec_get_pub_key(ec_context, public_key, public_key_size);
 }
 
+static
 bool libspdm_ec_check_key(const void *ec_context)
 {
     /* TBD*/
--- a/kernel-open/nvidia/libspdm_hkdf_sha.c
+++ b/kernel-open/nvidia/libspdm_hkdf_sha.c
@@ -26,6 +26,7 @@
 
 #include "internal_crypt_lib.h"
 
+static
 bool libspdm_hkdf_sha256_extract_and_expand(const uint8_t *key, size_t key_size,
                                             const uint8_t *salt, size_t salt_size,
                                             const uint8_t *info, size_t info_size,
@@ -54,6 +55,7 @@ bool libspdm_hkdf_sha256_expand(const ui
                           out, out_size);
 }
 
+static
 bool libspdm_hkdf_sha384_extract_and_expand(const uint8_t *key, size_t key_size,
                                             const uint8_t *salt, size_t salt_size,
                                             const uint8_t *info, size_t info_size,
@@ -82,6 +84,7 @@ bool libspdm_hkdf_sha384_expand(const ui
                           out, out_size);
 }
 
+static
 bool libspdm_hkdf_sha512_extract_and_expand(const uint8_t *key, size_t key_size,
                                             const uint8_t *salt, size_t salt_size,
                                             const uint8_t *info, size_t info_size,
--- a/kernel-open/nvidia/libspdm_rand.c
+++ b/kernel-open/nvidia/libspdm_rand.c
@@ -31,6 +31,7 @@ bool libspdm_random_bytes(uint8_t *outpu
 }
 
 // This is specifically allowed by spdm
+static
 bool libspdm_random_seed(const uint8_t *seed, size_t seed_size)
 {
     return true;
--- a/kernel-open/nvidia/libspdm_x509.c
+++ b/kernel-open/nvidia/libspdm_x509.c
@@ -32,6 +32,7 @@
 #include <keys/asymmetric-type.h>
 #endif
 
+static
 bool libspdm_x509_construct_certificate(const uint8_t *cert, size_t cert_size,
                                         uint8_t **single_x509_cert)
 {
@@ -39,17 +40,20 @@ bool libspdm_x509_construct_certificate(
     return false;
 }
 
+static
 bool libspdm_x509_construct_certificate_stack(uint8_t **x509_stack, ...)
 {
     LIBSPDM_ASSERT(false);
     return false;
 }
 
+static
 void libspdm_x509_free(void *x509_cert)
 {
     LIBSPDM_ASSERT(false);
 }
 
+static
 void libspdm_x509_stack_free(void *x509_stack)
 {
     LIBSPDM_ASSERT(false);
@@ -108,6 +112,7 @@ bool libspdm_x509_get_subject_name(const
     return false;
 }
 
+static
 bool libspdm_x509_get_common_name(const uint8_t *cert, size_t cert_size,
                                   char *common_name,
                                   size_t *common_name_size)
@@ -116,6 +121,7 @@ bool libspdm_x509_get_common_name(const
     return false;
 }
 
+static
 bool
 libspdm_x509_get_organization_name(const uint8_t *cert, size_t cert_size,
                                    char *name_buffer,
@@ -337,6 +343,7 @@ bool libspdm_x509_get_cert_from_cert_cha
     return false;
 }
 
+static
 bool libspdm_x509_get_tbs_cert(const uint8_t *cert, size_t cert_size,
                                uint8_t **tbs_cert, size_t *tbs_cert_size)
 {
@@ -367,6 +374,7 @@ bool libspdm_x509_get_issuer_name(const
     return false;
 }
 
+static
 bool
 libspdm_x509_get_issuer_common_name(const uint8_t *cert, size_t cert_size,
                                     char *common_name,
@@ -376,6 +384,7 @@ libspdm_x509_get_issuer_common_name(cons
     return false;
 }
 
+static
 bool
 libspdm_x509_get_issuer_orgnization_name(const uint8_t *cert, size_t cert_size,
                                          char *name_buffer,
@@ -385,6 +394,7 @@ libspdm_x509_get_issuer_orgnization_name
     return false;
 }
 
+static
 bool libspdm_x509_get_signature_algorithm(const uint8_t *cert,
                                           size_t cert_size, uint8_t *oid,
                                           size_t *oid_size)
@@ -446,6 +456,7 @@ int32_t libspdm_x509_compare_date_time(c
     return -3;
 }
 
+static
 bool libspdm_gen_x509_csr(size_t hash_nid, size_t asym_nid,
                           uint8_t *requester_info, size_t requester_info_length,
                           void *context, char *subject_name,