Commit f947d7fd authored by YueHaibing's avatar YueHaibing Committed by Herbert Xu

crypto: nx842 - remove set but not used variables 'dpadding' and 'max_sync_size'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/crypto/nx/nx-842.c: In function 'decompress':
drivers/crypto/nx/nx-842.c:356:25: warning: variable 'dpadding' set but not used [-Wunused-but-set-variable]
drivers/crypto/nx/nx-842-pseries.c: In function 'nx842_pseries_compress':
drivers/crypto/nx/nx-842-pseries.c:299:15: warning: variable 'max_sync_size' set but not used [-Wunused-but-set-variable]
drivers/crypto/nx/nx-842-pseries.c: In function 'nx842_pseries_decompress':
drivers/crypto/nx/nx-842-pseries.c:430:15: warning: variable 'max_sync_size' set but not used [-Wunused-but-set-variable]

They are not used any more and can be removed.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent dbbaffef
...@@ -296,7 +296,7 @@ static int nx842_pseries_compress(const unsigned char *in, unsigned int inlen, ...@@ -296,7 +296,7 @@ static int nx842_pseries_compress(const unsigned char *in, unsigned int inlen,
struct nx842_workmem *workmem; struct nx842_workmem *workmem;
struct nx842_scatterlist slin, slout; struct nx842_scatterlist slin, slout;
struct nx_csbcpb *csbcpb; struct nx_csbcpb *csbcpb;
int ret = 0, max_sync_size; int ret = 0;
unsigned long inbuf, outbuf; unsigned long inbuf, outbuf;
struct vio_pfo_op op = { struct vio_pfo_op op = {
.done = NULL, .done = NULL,
...@@ -319,7 +319,6 @@ static int nx842_pseries_compress(const unsigned char *in, unsigned int inlen, ...@@ -319,7 +319,6 @@ static int nx842_pseries_compress(const unsigned char *in, unsigned int inlen,
rcu_read_unlock(); rcu_read_unlock();
return -ENODEV; return -ENODEV;
} }
max_sync_size = local_devdata->max_sync_size;
dev = local_devdata->dev; dev = local_devdata->dev;
/* Init scatterlist */ /* Init scatterlist */
...@@ -427,7 +426,7 @@ static int nx842_pseries_decompress(const unsigned char *in, unsigned int inlen, ...@@ -427,7 +426,7 @@ static int nx842_pseries_decompress(const unsigned char *in, unsigned int inlen,
struct nx842_workmem *workmem; struct nx842_workmem *workmem;
struct nx842_scatterlist slin, slout; struct nx842_scatterlist slin, slout;
struct nx_csbcpb *csbcpb; struct nx_csbcpb *csbcpb;
int ret = 0, max_sync_size; int ret = 0;
unsigned long inbuf, outbuf; unsigned long inbuf, outbuf;
struct vio_pfo_op op = { struct vio_pfo_op op = {
.done = NULL, .done = NULL,
...@@ -451,7 +450,6 @@ static int nx842_pseries_decompress(const unsigned char *in, unsigned int inlen, ...@@ -451,7 +450,6 @@ static int nx842_pseries_decompress(const unsigned char *in, unsigned int inlen,
rcu_read_unlock(); rcu_read_unlock();
return -ENODEV; return -ENODEV;
} }
max_sync_size = local_devdata->max_sync_size;
dev = local_devdata->dev; dev = local_devdata->dev;
workmem = PTR_ALIGN(wmem, WORKMEM_ALIGN); workmem = PTR_ALIGN(wmem, WORKMEM_ALIGN);
......
...@@ -353,7 +353,7 @@ static int decompress(struct nx842_crypto_ctx *ctx, ...@@ -353,7 +353,7 @@ static int decompress(struct nx842_crypto_ctx *ctx,
unsigned int adj_slen = slen; unsigned int adj_slen = slen;
u8 *src = p->in, *dst = p->out; u8 *src = p->in, *dst = p->out;
u16 padding = be16_to_cpu(g->padding); u16 padding = be16_to_cpu(g->padding);
int ret, spadding = 0, dpadding = 0; int ret, spadding = 0;
ktime_t timeout; ktime_t timeout;
if (!slen || !required_len) if (!slen || !required_len)
...@@ -413,7 +413,6 @@ static int decompress(struct nx842_crypto_ctx *ctx, ...@@ -413,7 +413,6 @@ static int decompress(struct nx842_crypto_ctx *ctx,
spadding = 0; spadding = 0;
dst = p->out; dst = p->out;
dlen = p->oremain; dlen = p->oremain;
dpadding = 0;
if (dlen < required_len) { /* have ignore bytes */ if (dlen < required_len) { /* have ignore bytes */
dst = ctx->dbounce; dst = ctx->dbounce;
dlen = BOUNCE_BUFFER_SIZE; dlen = BOUNCE_BUFFER_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment