[PATCH] crypto: cryptd - Remove unused but set variable 'tfm'
Remove the unused but set variable tfm in cryptd_enqueue_request to fix the following warning when building with 'W=1': crypto/cryptd.c:125:21: warning: variable 'tfm' set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- crypto/cryptd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 0c654e59f215..3fd2a20a8145 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -122,7 +122,6 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue, { int cpu, err; struct cryptd_cpu_queue *cpu_queue; - struct crypto_tfm *tfm; atomic_t *refcnt; bool may_backlog; @@ -141,7 +140,6 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue, if (!atomic_read(refcnt)) goto out_put_cpu; - tfm = request->tfm; atomic_inc(refcnt); out_put_cpu: -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] padata: Remove unused but set variables
Remove the unused but set variable pinst in padata_parallel_worker to fix the following warning when building with 'W=1': kernel/padata.c: In function ‘padata_parallel_worker’: kernel/padata.c:68:26: warning: variable ‘pinst’ set but not used [-Wunused-but-set-variable] Also remove the now unused variable pd which is only used to set pinst. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- kernel/padata.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel/padata.c b/kernel/padata.c index 7848f0566403..05316c9f32da 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -64,15 +64,11 @@ static int padata_cpu_hash(struct parallel_data *pd) static void padata_parallel_worker(struct work_struct *parallel_work) { struct padata_parallel_queue *pqueue; - struct parallel_data *pd; - struct padata_instance *pinst; LIST_HEAD(local_list); local_bh_disable(); pqueue = container_of(parallel_work, struct padata_parallel_queue, work); - pd = pqueue->pd; - pinst = pd->pinst; spin_lock(>parallel.lock); list_replace_init(>parallel.list, _list); -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, RFC] random: introduce getrandom(2) system call
On 2014-07-17 at 11:18:15 +0200, Theodore Ts'o ty...@mit.edu wrote: [...] +/* + * Flags for getrandom(2) + * + * GAND_BLOCKAllow getrandom(2) to block + * GAND_RANDOM Use the /dev/random pool instead of /dev/urandom + */ Very minor nitpick: These should probably read GRND_BLOCK/GRND_RANDOM as well, no? +#define GRND_BLOCK 0x0001 +#define GRND_RANDOM 0x0002 + #endif /* _UAPI_LINUX_RANDOM_H */ -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] crypto: mv_cesa - Use resource_size
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors. Signed-off-by: Tobias Klauser tklau...@distanz.ch --- drivers/crypto/mv_cesa.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 18a436c..e095422 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c @@ -1023,7 +1023,7 @@ static int mv_probe(struct platform_device *pdev) spin_lock_init(cp-lock); crypto_init_queue(cp-queue, 50); - cp-reg = ioremap(res-start, res-end - res-start + 1); + cp-reg = ioremap(res-start, resource_size(res)); if (!cp-reg) { ret = -ENOMEM; goto err; @@ -1034,7 +1034,7 @@ static int mv_probe(struct platform_device *pdev) ret = -ENXIO; goto err_unmap_reg; } - cp-sram_size = res-end - res-start + 1; + cp-sram_size = resource_size(res); cp-max_req_size = cp-sram_size - SRAM_CFG_SPACE; cp-sram = ioremap(res-start, cp-sram_size); if (!cp-sram) { -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html