Skip to contentSkip to conversation

smb: client: Omit one redundant variable assignment in cifs_xattr_set()

PATCH Applied Markus Elfring 2 participants 2 messages Oct 10, 2025 – Oct 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smb: client: Omit one redundant variable assignment in cifs_xattr_set()

From: Markus Elfring <[email protected]>
Date: Fri, 10 Oct 2025 14:48:13 +0200

The local variable “rc” is assigned a value in an if branch without using it before it is reassigned there.
Thus delete this assignment statement.

---
 fs/smb/client/xattr.c | 1 -
 1 file changed, 1 deletion(-)
fs/smb/client/xattr.c +0 -1
index b88fa04f5792..029910d56c22 100644
@@ -178,7 +178,6 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
 			memcpy(pacl, value, size);
 			if (pTcon->ses->server->ops->set_acl) {
 				int aclflags = 0;
-				rc = 0;
 
 				switch (handler->flags) {
 				case XATTR_CIFS_NTSD_FULL:
Signature · 1 line
2.51.0
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 29 lines · Markus Elfring

From: Markus Elfring <[email protected]>
Date: Fri, 10 Oct 2025 14:48:13 +0200

The local variable “rc” is assigned a value in an if branch without using it before it is reassigned there.
Thus delete this assignment statement.

---
 fs/smb/client/xattr.c | 1 -
 1 file changed, 1 deletion(-)
fs/smb/client/xattr.c +0 -2
index b88fa04f5792..029910d56c22 100644
@@ -178,7 +178,6 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
                        memcpy(pacl, value, size);
                        if (pTcon->ses->server->ops->set_acl) {
                                int aclflags = 0;
-                               rc = 0;
 
                                switch (handler->flags) {
                                case XATTR_CIFS_NTSD_FULL:
--

2.51.0

Signature · 3 lines
Thanks,

Steve