Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hv_balloon: Remove redundant assignment to region_start

Variable region_start is set to pg_start but this value is never
read as it is overwritten later on, hence it is a redundant
assignment and can be removed.

Cleans up the following clang-analyzer warning:

drivers/hv/hv_balloon.c:1013:3: warning: Value stored to 'region_start'
is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1619691681-86256-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Jiapeng Chong and committed by
Wei Liu
03b30cc3 6efb943b

-1
-1
drivers/hv/hv_balloon.c
··· 1010 1010 * that need to be hot-added while ensuring the alignment 1011 1011 * and size requirements of Linux as it relates to hot-add. 1012 1012 */ 1013 - region_start = pg_start; 1014 1013 region_size = (pfn_cnt / HA_CHUNK) * HA_CHUNK; 1015 1014 if (pfn_cnt % HA_CHUNK) 1016 1015 region_size += HA_CHUNK;