[PATCH 10/30] crypto: sa2ul - remove unused includes and defines
From: Manorit Chawdhry
Date: Tue Sep 15 2026 - 06:12:04 EST
Remove unused includes and define statements that are not
referenced anywhere in the driver.
Assisted-by: Sisyphus:claude-sonnet-4-6
Signed-off-by: Manorit Chawdhry <m-chawdhry@xxxxxx>
---
drivers/crypto/sa2ul.c | 13 -------------
drivers/crypto/sa2ul.h | 12 ------------
2 files changed, 25 deletions(-)
diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index 13e941f58c4b..f98d199729d0 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -9,7 +9,6 @@
* Tero Kristo
*/
#include <linux/bitfield.h>
-#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/dmapool.h>
@@ -70,14 +69,6 @@
#define SA_SW2_EGRESS_LENGTH 0xFF000000
#define SA_BASIC_HASH 0x10
-#define SHA256_DIGEST_WORDS 8
-/* Make 32-bit word from 4 bytes */
-#define SA_MK_U32(b0, b1, b2, b3) (((b0) << 24) | ((b1) << 16) | \
- ((b2) << 8) | (b3))
-
-/* size of SCCTL structure in bytes */
-#define SA_SCCTL_SZ 16
-
/* Max Authentication tag size */
#define SA_MAX_AUTH_TAG_SZ 64
@@ -199,14 +190,12 @@ struct sa_rx_data {
/**
* struct sa_req: SA request definition
- * @dev: device for the request
* @size: total data to the xmitted via DMA
* @enc_offset: offset of cipher data
* @enc_size: data to be passed to cipher engine
* @enc_iv: cipher IV
* @auth_offset: offset of the authentication data
* @auth_size: size of the authentication data
- * @auth_iv: authentication IV
* @type: algorithm type for the request
* @cmdl: command label pointer
* @base: pointer to the base request
@@ -218,14 +207,12 @@ struct sa_rx_data {
* @mdata_size: metadata size passed to DMA
*/
struct sa_req {
- struct device *dev;
u16 size;
u8 enc_offset;
u16 enc_size;
u8 *enc_iv;
u8 auth_offset;
u16 auth_size;
- u8 *auth_iv;
u32 type;
u32 *cmdl;
struct crypto_async_request *base;
diff --git a/drivers/crypto/sa2ul.h b/drivers/crypto/sa2ul.h
index 48ed1933ecae..7c0ca2ca966e 100644
--- a/drivers/crypto/sa2ul.h
+++ b/drivers/crypto/sa2ul.h
@@ -169,7 +169,6 @@ struct sa_match_data;
* @scid_lock: secure context ID lock
* @sc_id: Security Context ID
* @ctx_bm: Bitmap to keep track of Security context ID's
- * @ctx: SA tfm context pointer
* @dma_rx1: Pointer to DMA rx channel for sizes < 256 Bytes
* @dma_rx2: Pointer to DMA rx channel for sizes > 256 Bytes
* @dma_tx: Pointer to DMA TX channel
@@ -184,7 +183,6 @@ struct sa_crypto_data {
u16 sc_id;
unsigned long ctx_bm[DIV_ROUND_UP(SA_MAX_NUM_CTX,
BITS_PER_LONG)];
- struct sa_tfm_ctx *ctx;
struct dma_chan *dma_rx1;
struct dma_chan *dma_rx2;
struct dma_chan *dma_tx;
@@ -193,12 +191,10 @@ struct sa_crypto_data {
/**
* struct sa_cmdl_param_info: Command label parameters info
* @index: Index of the parameter in the command label format
- * @offset: the offset of the parameter
* @size: Size of the parameter
*/
struct sa_cmdl_param_info {
u16 index;
- u16 offset;
u16 size;
};
@@ -208,7 +204,6 @@ struct sa_cmdl_param_info {
/**
* struct sa_cmdl_upd_info: Command label updation info
* @flags: flags in command label
- * @submode: Encryption submodes
* @enc_size: Size of first pass encryption size
* @enc_offset: Encryption payload offset in the packet
* @enc_iv: Encryption initialization vector for pass2
@@ -217,7 +212,6 @@ struct sa_cmdl_param_info {
*/
struct sa_cmdl_upd_info {
u16 flags;
- u16 submode;
struct sa_cmdl_param_info enc_size;
struct sa_cmdl_param_info enc_offset;
struct sa_cmdl_param_info enc_iv;
@@ -262,7 +256,6 @@ struct sa_ctx_info {
* @dev_data: struct sa_crypto_data pointer
* @enc: struct sa_ctx_info for encryption
* @dec: struct sa_ctx_info for decryption
- * @keylen: encrption/decryption keylength
* @iv_idx: Initialization vector index
* @key: encryption key
* @fallback: SW fallback algorithm
@@ -271,7 +264,6 @@ struct sa_tfm_ctx {
struct sa_crypto_data *dev_data;
struct sa_ctx_info enc;
struct sa_ctx_info dec;
- int keylen;
int iv_idx;
struct crypto_shash *shash;
/* for fallback */
@@ -284,13 +276,9 @@ struct sa_tfm_ctx {
/**
* struct sa_sha_req_ctx: Structure used for sha request
- * @dev_data: struct sa_crypto_data pointer
- * @cmdl: Complete command label with psdata and epib included
* @fallback_req: SW fallback request container
*/
struct sa_sha_req_ctx {
- struct sa_crypto_data *dev_data;
- u32 cmdl[SA_MAX_CMDL_WORDS + SA_PSDATA_CTX_WORDS];
struct ahash_request fallback_req;
};
--
2.43.0