fs/cifs: Simplify bool comparison.
Subsystems (2)
PATCH v2 1/1 fs/cifs: Simplify bool comparison.
Fix the follow warnings:
./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable
---
Changes in v2:
-Modified subject.
fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/connect.c +2 -2
@@ -2628,7 +2628,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, }else if (ctx) tcon->unix_ext =1 ;/* Unix Extensions supported */ -if (tcon->unix_ext ==0 ) { +if (!tcon->unix_ext) {cifs_dbg (FYI ,"Unix extensions disabled so not set on reconnect\n" );return ; }
@@ -3740,7 +3740,7 @@ static void delayed_free(struct rcu_head *p)if (!ses->binding) { ses->capabilities = server->capabilities; -if (linuxExtEnabled ==0 ) +if (!linuxExtEnabled) ses->capabilities &= (~server->vals->cap_unix);if (ses->auth_key.response) {
Signature · 1 line
1.8.3.1
The patch wouldn't merge (probably fixed with an earlier patch) so I removed the second part of it (ie the change around line 3740) - see below and merged the smaller change below into cifs-2.6.git for-next
commit d1639d92fc762bf80273aaf52d87eb780711714c (HEAD -> for-next, origin/for-next)
Author: Jiapeng Zhong <[email protected]> Date: Thu Jan 14 18:02:23 2021 +0800
fs/cifs: Simplify bool comparison.
Fix the follow warnings:
./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable
fs/cifs/connect.c +0 -0
@@ -2628,7 +2628,7 @@ void reset_cifs_unix_caps(unsigned int xid,
struct cifs_tcon *tcon,
} else if (ctx)
tcon->unix_ext = 1; /* Unix Extensions supported */- if (tcon->unix_ext == 0) {
+ if (!tcon->unix_ext) {
cifs_dbg(FYI, "Unix extensions disabled so not set on
reconnect\n");
return;
}Quoted 40 lines · Jiapeng Zhong
Fix the follow warnings:
./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variableReported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Zhong <[email protected]>---
Changes in v2:
-Modified subject.fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/cifs/connect.c +2
-3@@ -2628,7 +2628,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, }else if (ctx) tcon->unix_ext =1 ;/* Unix Extensions supported */ -if (tcon->unix_ext ==0 ) { +if (!tcon->unix_ext) {cifs_dbg (FYI ,"Unix extensions disabled so not set on reconnect\n" );return ; }@@ -3740,7 +3740,7 @@ static void delayed_free(struct rcu_head *p)if (!ses->binding) { ses->capabilities = server->capabilities; -if (linuxExtEnabled ==0 ) +if (!linuxExtEnabled) ses->capabilities &= (~server->vals->cap_unix);if (ses->auth_key.response) { --1.8.3.1
Signature · 3 lines
Thanks, Steve