Skip to content

Commit

Permalink
crypto: caam - remove unused sg_to_sec4_sg_len()
Browse files Browse the repository at this point in the history
sg_to_sec4_sg_len() is no longer used since
commit 479bcc7 ("crypto: caam - Convert authenc to new AEAD interface")

Its functionality has been superseded by the usage of sg_nents_for_len()
returning the number of S/G entries corresponding to the provided length.

Signed-off-by: Horia Geantă <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
horiag authored and herbertx committed Jul 18, 2017
1 parent c7a91eb commit bcde1f7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions drivers/crypto/caam/sg_sw_sec4.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,3 @@ static inline void sg_to_sec4_sg_last(struct scatterlist *sg, int sg_count,
sec4_sg_ptr = sg_to_sec4_sg(sg, sg_count, sec4_sg_ptr, offset);
sec4_sg_ptr->len |= cpu_to_caam32(SEC4_SG_LEN_FIN);
}

static inline struct sec4_sg_entry *sg_to_sec4_sg_len(
struct scatterlist *sg, unsigned int total,
struct sec4_sg_entry *sec4_sg_ptr)
{
do {
unsigned int len = min(sg_dma_len(sg), total);

dma_to_sec4_sg_one(sec4_sg_ptr, sg_dma_address(sg), len, 0);
sec4_sg_ptr++;
sg = sg_next(sg);
total -= len;
} while (total);
return sec4_sg_ptr - 1;
}

0 comments on commit bcde1f7

Please sign in to comment.