mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 15:39:42 -04:00
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>
This commit is contained in:
committed by
Mikulas Patocka
parent
9f5c33bddd
commit
4466dd3d71
@@ -805,7 +805,8 @@ static int cache_write(struct pcache_cache *cache, struct pcache_request *pcache
|
||||
int cache_flush(struct pcache_cache *cache)
|
||||
{
|
||||
struct pcache_cache_kset *kset;
|
||||
u32 i, ret;
|
||||
int ret;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < cache->n_ksets; i++) {
|
||||
kset = get_kset(cache, i);
|
||||
|
||||
Reference in New Issue
Block a user