* [PATCH v2] fs/cifs: Simplify bool comparison.
@ 2021-01-14 10:02 Jiapeng Zhong
2021-01-17 2:14 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Zhong @ 2021-01-14 10:02 UTC (permalink / raw)
To: sfrench; +Cc: linux-cifs, linux-kernel, Jiapeng Zhong
Fix the follow warnings:
./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
Changes in v2:
-Modified subject.
fs/cifs/connect.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b9df855..b7869a2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] fs/cifs: Simplify bool comparison.
2021-01-14 10:02 [PATCH v2] fs/cifs: Simplify bool comparison Jiapeng Zhong
@ 2021-01-17 2:14 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2021-01-17 2:14 UTC (permalink / raw)
To: Jiapeng Zhong; +Cc: Steve French, CIFS, LKML
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 <abaci-bugfix@linux.alibaba.com>
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
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7c3325c0fadc..c8ef24bac94f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -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;
}
On Thu, Jan 14, 2021 at 4:07 AM Jiapeng Zhong
<abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the follow warnings:
>
> ./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
>
> ---
> Changes in v2:
> -Modified subject.
>
> fs/cifs/connect.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index b9df855..b7869a2 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -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
>
--
Thanks,
Steve
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-17 2:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 10:02 [PATCH v2] fs/cifs: Simplify bool comparison Jiapeng Zhong
2021-01-17 2:14 ` Steve French
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.