From: Jiapeng Zhong Date: Thu, 21 Jan 2021 07:59:21 +0000 (+0800) Subject: regmap: Assign boolean values to a bool variable X-Git-Tag: v5.12-rc1~118^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b67498d630037f509a14b208b1994b38714372ad;p=thirdparty%2Fkernel%2Flinux.git regmap: Assign boolean values to a bool variable Fix the following coccicheck warnings: ./drivers/base/regmap/regcache.c:71:3-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Link: https://lore.kernel.org/r/1611215961-33725-1-git-send-email-abaci-bugfix@linux.alibaba.com Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 7f4b3b62492ca..f2469d3435ca3 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -68,7 +68,7 @@ static int regcache_hw_init(struct regmap *map) map->cache_bypass = cache_bypass; if (ret == 0) { map->reg_defaults_raw = tmp_buf; - map->cache_free = 1; + map->cache_free = true; } else { kfree(tmp_buf); }