From: Mike Snitzer <snitzer@xxxxxxxxxx> Remove temporary 'duration' variable. And cleanup coding style nit. Reviewed-by: Susan LeGendre-McGhee <slegendr@xxxxxxxxxx> Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx> Signed-off-by: Matthew Sakai <msakai@xxxxxxxxxx> --- drivers/md/dm-vdo/memory-alloc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md/dm-vdo/memory-alloc.c index 136a19db33be..e9464d4a1e64 100644 --- a/drivers/md/dm-vdo/memory-alloc.c +++ b/drivers/md/dm-vdo/memory-alloc.c @@ -286,13 +286,9 @@ int uds_allocate_memory(size_t size, size_t align, const char *what, void *ptr) if (allocations_restricted) memalloc_noio_restore(noio_flags); - if (p == NULL) { - unsigned int duration = jiffies_to_msecs(jiffies - start_time); - + if (unlikely(p == NULL)) { uds_log_error("Could not allocate %zu bytes for %s in %u msecs", - size, - what, - duration); + size, what, jiffies_to_msecs(jiffies - start_time)); return -ENOMEM; } -- 2.40.0