Skip to contentSkip to conversation

cifsd: remove duplicated argument

PATCH In review Wan Jiabing 2 participants 2 messages Jun 7, 2021

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

PATCH 1/1 cifsd: remove duplicated argument

Fix the following coccicheck warning:
./fs/cifsd/smb2pdu.c:1713:27-41: duplicated argument to & or |

FILE_DELETE_LE is duplicated. Remove one and reorder argument to make coding style reasonable.

---
 fs/cifsd/smb2pdu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/cifsd/smb2pdu.c +4 -4
index 3e112fbdc2d9..9a46897d39c9 100644
@@ -1710,10 +1710,10 @@ int smb2_tree_connect(struct ksmbd_work *work)
 					KSMBD_TREE_CONN_FLAG_WRITABLE)) {
 			rsp->MaximalAccess |= FILE_WRITE_DATA_LE |
 				FILE_APPEND_DATA_LE | FILE_WRITE_EA_LE |
-				FILE_DELETE_CHILD_LE | FILE_DELETE_LE |
-				FILE_WRITE_ATTRIBUTES_LE | FILE_DELETE_LE |
-				FILE_READ_CONTROL_LE | FILE_WRITE_DAC_LE |
-				FILE_WRITE_OWNER_LE | FILE_SYNCHRONIZE_LE;
+				FILE_DELETE_LE | FILE_WRITE_ATTRIBUTES_LE |
+				FILE_DELETE_CHILD_LE | FILE_READ_CONTROL_LE |
+				FILE_WRITE_DAC_LE | FILE_WRITE_OWNER_LE |
+				FILE_SYNCHRONIZE_LE;
 		}
 	}
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines

Fix the following coccicheck warning:
./fs/cifsd/smb2pdu.c:1713:27-41: duplicated argument to & or |

FILE_DELETE_LE is duplicated. Remove one and reorder argument to make coding style reasonable.

I will apply it, Thanks for your patch!