[PATCH 08/30] crypto: sa2ul - remove unused SC ID range tracking
From: Manorit Chawdhry
Date: Tue Sep 15 2026 - 06:10:50 EST
Remove unused sc_id_start and sc_id_end fields from sa_dev_data.
These were intended for security context ID management but were
never used in the driver.
Assisted-by: Sisyphus:claude-sonnet-4-6
Signed-off-by: Manorit Chawdhry <m-chawdhry@xxxxxx>
---
drivers/crypto/sa2ul.c | 4 ++--
drivers/crypto/sa2ul.h | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index cde08686f27a..72be29820859 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -764,7 +764,7 @@ static void sa_free_ctx_info(struct sa_ctx_info *ctx,
{
unsigned long bn;
- bn = ctx->sc_id - data->sc_id_start;
+ bn = ctx->sc_id;
spin_lock(&data->scid_lock);
__clear_bit(bn, data->ctx_bm);
data->sc_id--;
@@ -788,7 +788,7 @@ static int sa_init_ctx_info(struct sa_ctx_info *ctx,
data->sc_id++;
spin_unlock(&data->scid_lock);
- ctx->sc_id = (u16)(data->sc_id_start + bn);
+ ctx->sc_id = (u16)bn;
ctx->sc = dma_pool_alloc(data->sc_pool, GFP_KERNEL, &ctx->sc_phys);
if (!ctx->sc) {
diff --git a/drivers/crypto/sa2ul.h b/drivers/crypto/sa2ul.h
index 94101300736c..c41c688687f5 100644
--- a/drivers/crypto/sa2ul.h
+++ b/drivers/crypto/sa2ul.h
@@ -168,8 +168,6 @@ struct sa_match_data;
* @sc_pool: security context pool
* @dev: Device pointer
* @scid_lock: secure context ID lock
- * @sc_id_start: starting index for SC ID
- * @sc_id_end: Ending index for SC ID
* @sc_id: Security Context ID
* @ctx_bm: Bitmap to keep track of Security context ID's
* @ctx: SA tfm context pointer
@@ -185,8 +183,6 @@ struct sa_crypto_data {
struct device *dev;
spinlock_t scid_lock; /* lock for SC-ID allocation */
/* Security context data */
- u16 sc_id_start;
- u16 sc_id_end;
u16 sc_id;
unsigned long ctx_bm[DIV_ROUND_UP(SA_MAX_NUM_CTX,
BITS_PER_LONG)];
--
2.43.0