Re: [PATCH] afs: Fix bool initialization/comparison

2017-10-10 Thread David Howells
Thomas Meyer  wrote:

> Bool initializations should use true and false. Bool tests don't need
> comparisons.
> 
> Signed-off-by: Thomas Meyer 

Please rebase on top of:


https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-2-experimental

Some of the code you're changing has been deleted.

David


Re: [PATCH] afs: Fix bool initialization/comparison

2017-10-10 Thread David Howells
Thomas Meyer  wrote:

> Bool initializations should use true and false. Bool tests don't need
> comparisons.
> 
> Signed-off-by: Thomas Meyer 

Please rebase on top of:


https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-2-experimental

Some of the code you're changing has been deleted.

David


[PATCH] afs: Fix bool initialization/comparison

2017-10-07 Thread Thomas Meyer
Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer 
---

diff -u -p a/fs/afs/cache.c b/fs/afs/cache.c
--- a/fs/afs/cache.c
+++ b/fs/afs/cache.c
@@ -195,7 +195,7 @@ enum fscache_checkaux afs_vlocation_cach
 * VL record from the cache */
if (!vlocation->valid || vlocation->vldb.rtime == cvldb->rtime) {
memcpy((uint8_t *)>vldb.nservers, buffer, dlen);
-   vlocation->valid = 1;
+   vlocation->valid = true;
_leave(" = SUCCESS [c->m]");
return FSCACHE_CHECKAUX_OKAY;
}
diff -u -p a/fs/afs/super.c b/fs/afs/super.c
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -211,7 +211,7 @@ static int afs_parse_options(struct afs_
break;
 
case afs_opt_rwpath:
-   params->rwpath = 1;
+   params->rwpath = true;
break;
 
case afs_opt_vol:
@@ -219,7 +219,7 @@ static int afs_parse_options(struct afs_
break;
 
case afs_opt_autocell:
-   params->autocell = 1;
+   params->autocell = true;
break;
 
default:
diff -u -p a/fs/afs/vlocation.c b/fs/afs/vlocation.c
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -154,7 +154,7 @@ out:
printk(KERN_NOTICE "kAFS:"
   " Active volume no longer valid '%s'\n",
   vl->vldb.name);
-   vl->valid = 0;
+   vl->valid = false;
ret = -ENOMEDIUM;
}
 


[PATCH] afs: Fix bool initialization/comparison

2017-10-07 Thread Thomas Meyer
Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer 
---

diff -u -p a/fs/afs/cache.c b/fs/afs/cache.c
--- a/fs/afs/cache.c
+++ b/fs/afs/cache.c
@@ -195,7 +195,7 @@ enum fscache_checkaux afs_vlocation_cach
 * VL record from the cache */
if (!vlocation->valid || vlocation->vldb.rtime == cvldb->rtime) {
memcpy((uint8_t *)>vldb.nservers, buffer, dlen);
-   vlocation->valid = 1;
+   vlocation->valid = true;
_leave(" = SUCCESS [c->m]");
return FSCACHE_CHECKAUX_OKAY;
}
diff -u -p a/fs/afs/super.c b/fs/afs/super.c
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -211,7 +211,7 @@ static int afs_parse_options(struct afs_
break;
 
case afs_opt_rwpath:
-   params->rwpath = 1;
+   params->rwpath = true;
break;
 
case afs_opt_vol:
@@ -219,7 +219,7 @@ static int afs_parse_options(struct afs_
break;
 
case afs_opt_autocell:
-   params->autocell = 1;
+   params->autocell = true;
break;
 
default:
diff -u -p a/fs/afs/vlocation.c b/fs/afs/vlocation.c
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -154,7 +154,7 @@ out:
printk(KERN_NOTICE "kAFS:"
   " Active volume no longer valid '%s'\n",
   vl->vldb.name);
-   vl->valid = 0;
+   vl->valid = false;
ret = -ENOMEDIUM;
}