dm-pcache: fix warnings found by smatch
Subsystems (2)
Dongsheng Yang
maintainercover dm-pcache: fix warnings found by smatch
Hi Mikulas,
Please help to apply these two changes into dm-6.18.
It fixes two warnings found by smatch.
Thanx for the report from Dan.
Dongsheng Yang (2):
dm-pcache: fix uninitialized variable issue found by smatch
dm-pcache: fix an indenting issue found by smatch
drivers/md/dm-pcache/cache_req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
Dongsheng Yang
maintainerPATCH 1/2 dm-pcache: fix uninitialized variable issue found by smatch
--- drivers/md/dm-pcache/cache_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-pcache/cache_req.c +1 -1
@@ -45,6 +45,7 @@ static int cache_data_alloc(struct pcache_cache *cache, struct pcache_cache_keypreempt_disable (); data_head =get_data_head (cache); again: + to_alloc = key->len - allocated;if (!data_head->head_pos.cache_seg) { seg_remain =0 ; }else {
@@ -54,7 +55,6 @@ static int cache_data_alloc(struct pcache_cache *cache, struct pcache_cache_key head_pos = &data_head->head_pos; cache_seg = head_pos->cache_seg; seg_remain =cache_seg_remain (head_pos); - to_alloc = key->len - allocated; }if (seg_remain > to_alloc) {
Signature · 1 line
2.43.0
Dongsheng Yang
maintainerPATCH 2/2 dm-pcache: fix an indenting issue found by smatch
In reply to Dongsheng Yang--- drivers/md/dm-pcache/cache_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-pcache/cache_req.c +1 -1
@@ -298,7 +298,7 @@ static struct pcache_backing_dev_req *get_pre_alloc_req(struct pcache_cache_subtreturn backing_req; } -return cache_miss_req_alloc (cache, pcache_req,GFP_NOWAIT ); +return cache_miss_req_alloc (cache, pcache_req,GFP_NOWAIT ); }/*
Signature · 1 line
2.43.0
Mikulas Patocka
maintainerQuoted 4 lines · Dongsheng Yang
Hi Mikulas,
Please help to apply these two changes into dm-6.18.
It fixes two warnings found by smatch.
Quoted 11 lines
Thanx for the report from Dan.
Dongsheng Yang (2):
dm-pcache: fix uninitialized variable issue found by smatch
dm-pcache: fix an indenting issue found by smatchdrivers/md/dm-pcache/cache_req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Signature · 1 line
2.43.0
Thanks. I folded them into the existing patch.
Mikulas