Skip to content

Commit ec99818

Browse files
ebiggersmartinkpetersen
authored andcommitted
scsi: ufs: core: fold ufshcd_clear_keyslot() into its caller
Fold ufshcd_clear_keyslot() into its only remaining caller. Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Peter Griffin <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Alim Akhtar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c2a90ee commit ec99818

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

drivers/ufs/core/ufshcd-crypto.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@ static int ufshcd_crypto_keyslot_program(struct blk_crypto_profile *profile,
9595
return err;
9696
}
9797

98-
static int ufshcd_clear_keyslot(struct ufs_hba *hba, int slot)
98+
static int ufshcd_crypto_keyslot_evict(struct blk_crypto_profile *profile,
99+
const struct blk_crypto_key *key,
100+
unsigned int slot)
99101
{
102+
struct ufs_hba *hba =
103+
container_of(profile, struct ufs_hba, crypto_profile);
100104
/*
101105
* Clear the crypto cfg on the device. Clearing CFGE
102106
* might not be sufficient, so just clear the entire cfg.
@@ -106,16 +110,6 @@ static int ufshcd_clear_keyslot(struct ufs_hba *hba, int slot)
106110
return ufshcd_program_key(hba, &cfg, slot);
107111
}
108112

109-
static int ufshcd_crypto_keyslot_evict(struct blk_crypto_profile *profile,
110-
const struct blk_crypto_key *key,
111-
unsigned int slot)
112-
{
113-
struct ufs_hba *hba =
114-
container_of(profile, struct ufs_hba, crypto_profile);
115-
116-
return ufshcd_clear_keyslot(hba, slot);
117-
}
118-
119113
bool ufshcd_crypto_enable(struct ufs_hba *hba)
120114
{
121115
if (!(hba->caps & UFSHCD_CAP_CRYPTO))

0 commit comments

Comments
 (0)