Skip to content

Commit

Permalink
crypto: talitos - convert to use be16_add_cpu()
Browse files Browse the repository at this point in the history
Convert cpu_to_be16(be16_to_cpu(E1) + E2) to use be16_add_cpu().

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Wei Yongjun authored and herbertx committed Oct 15, 2012
1 parent e3899e4 commit 7291a93
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/talitos.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,7 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count,
sg_count--;
link_tbl_ptr--;
}
link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len)
+ cryptlen);
be16_add_cpu(&link_tbl_ptr->len, cryptlen);

/* tag end of link table */
link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN;
Expand Down

0 comments on commit 7291a93

Please sign in to comment.