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

Configure Feed

Select the types of activity you want to include in your feed.

dm-pcache: use int type to store negative error codes

Change the 'ret' variable from u32 to int to store negative error codes or
zero returned by cache_kset_close().

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly. Additionally, assigning negative error codes to
unsigned type may trigger a GCC warning when the -Wsign-conversion flag
is enabled.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Qianfeng Rong and committed by
Mikulas Patocka
4466dd3d 9f5c33bd

+2 -1
+2 -1
drivers/md/dm-pcache/cache_req.c
··· 805 805 int cache_flush(struct pcache_cache *cache) 806 806 { 807 807 struct pcache_cache_kset *kset; 808 - u32 i, ret; 808 + int ret; 809 + u32 i; 809 810 810 811 for (i = 0; i < cache->n_ksets; i++) { 811 812 kset = get_kset(cache, i);