Skip to content

Commit

Permalink
Address warnings for LLVM 16
Browse files Browse the repository at this point in the history
Might not be all of them though.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Aug 4, 2023
1 parent 61703b0 commit cca9766
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions include/os/windows/spl/sys/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,6 @@ int blkdev_issue_discard_bytes(PDEVICE_OBJECT dev, uint64_t offset,
uint64_t size, uint32_t flags);

POPLOCK vp_oplock(struct vnode *vp);
void vfs_changeowner(mount_t *from, mount_t *to);

#endif /* SPL_VNODE_H */
6 changes: 3 additions & 3 deletions module/icp/algs/aes/aes_impl_aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern ASMABI void aes_decrypt_intel(const uint32_t rk[], int Nr,
* keyarr32 User key
* keyBits AES key size (128, 192, or 256 bits)
*/
static void
static void ASMABI
aes_aesni_generate(aes_key_t *key, const uint32_t *keyarr32, int keybits)
{
kfpu_begin();
Expand All @@ -75,7 +75,7 @@ aes_aesni_generate(aes_key_t *key, const uint32_t *keyarr32, int keybits)
* pt Input block (plain text)
* ct Output block (crypto text). Can overlap with pt
*/
static void
static void ASMABI
aes_aesni_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
uint32_t ct[4])
{
Expand All @@ -98,7 +98,7 @@ aes_aesni_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
* ct Input block (crypto text)
* pt Output block (plain text). Can overlap with pt
*/
static void
static void ASMABI
aes_aesni_decrypt(const uint32_t rk[], int Nr, const uint32_t ct[4],
uint32_t pt[4])
{
Expand Down
10 changes: 5 additions & 5 deletions module/icp/algs/aes/aes_impl_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ static const uint32_t rcon[RC_LENGTH] =
* cipherKey User key
* keyBits AES key size (128, 192, or 256 bits)
*/
static int
static int ASMABI
rijndael_key_setup_enc(uint32_t rk[], const uint32_t cipherKey[],
int keyBits)
{
Expand Down Expand Up @@ -891,7 +891,7 @@ rijndael_key_setup_enc(uint32_t rk[], const uint32_t cipherKey[],
* cipherKey User key
* keyBits AES key size (128, 192, or 256 bits)
*/
static int
static int ASMABI
rijndael_key_setup_dec(uint32_t rk[], const uint32_t cipherKey[], int keyBits)
{
int Nr, i, j;
Expand Down Expand Up @@ -952,7 +952,7 @@ rijndael_key_setup_dec(uint32_t rk[], const uint32_t cipherKey[], int keyBits)
* keyarr32 User key
* keyBits AES key size (128, 192, or 256 bits)
*/
static void
static void ASMABI
aes_generic_generate(aes_key_t *key, const uint32_t *keyarr32, int keybits)
{
key->nr = rijndael_key_setup_enc(&(key->encr_ks.ks32[0]), keyarr32,
Expand All @@ -975,7 +975,7 @@ aes_generic_generate(aes_key_t *key, const uint32_t *keyarr32, int keybits)
* pt Input block (plain text)
* ct Output block (crypto text). Can overlap with pt
*/
static void
static void ASMABI
aes_generic_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
uint32_t ct[4])
{
Expand Down Expand Up @@ -1103,7 +1103,7 @@ aes_generic_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
* ct Input block (crypto text)
* pt Output block (plain text). Can overlap with pt
*/
static void
static void ASMABI
aes_generic_decrypt(const uint32_t rk[], int Nr, const uint32_t ct[4],
uint32_t pt[4])
{
Expand Down
3 changes: 3 additions & 0 deletions module/icp/algs/modes/gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,8 @@ gcm_init_avx(gcm_ctx_t *ctx, const uint8_t *iv, size_t iv_len,
}

#if defined(_KERNEL)

#ifdef __linux__
static int
icp_gcm_avx_set_chunk_size(const char *buf, zfs_kernel_param_t *kp)
{
Expand All @@ -1590,6 +1592,7 @@ icp_gcm_avx_set_chunk_size(const char *buf, zfs_kernel_param_t *kp)
error = param_set_uint(val_rounded, kp);
return (error);
}
#endif

#ifdef _WIN32
/* Lives in here to have access to GCM macros */
Expand Down
7 changes: 4 additions & 3 deletions module/icp/include/aes/aes_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ typedef enum aes_mech_type {
* @aes_dec_f Function decrypts one block
* @aes_will_work_f Function tests whether method will function
*/
typedef void (*aes_generate_f)(aes_key_t *, const uint32_t *, int);
typedef void (*aes_encrypt_f)(const uint32_t[], int,
typedef void ASMABI (*aes_generate_f)(aes_key_t *,
const uint32_t *, int);
typedef void ASMABI (*aes_encrypt_f)(const uint32_t[], int,
const uint32_t[4], uint32_t[4]);
typedef void (*aes_decrypt_f)(const uint32_t[], int,
typedef void ASMABI (*aes_decrypt_f)(const uint32_t[], int,
const uint32_t[4], uint32_t[4]);
typedef boolean_t (*aes_will_work_f)(void);

Expand Down

0 comments on commit cca9766

Please sign in to comment.