* [PATCH] smb: client: Return a status code only as a constant in sid_to_id()
@ 2025-10-10 19:21 Markus Elfring
2025-10-11 20:00 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2025-10-10 19:21 UTC (permalink / raw)
To: linux-cifs, samba-technical, Bharath SM, Paulo Alcantara,
Qiujun Huang, Ronnie Sahlberg, Shyam Prasad N, Steve French,
Tom Talpey
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 10 Oct 2025 21:04:16 +0200
Return a status code without storing it in an intermediate variable.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/smb/client/cifsacl.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c
index 63b3b1290bed..ce2ebc213a1d 100644
--- a/fs/smb/client/cifsacl.c
+++ b/fs/smb/client/cifsacl.c
@@ -339,7 +339,6 @@ int
sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
struct cifs_fattr *fattr, uint sidtype)
{
- int rc = 0;
struct key *sidkey;
char *sidstr;
const struct cred *saved_cred;
@@ -446,12 +445,12 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
* fails then we just fall back to using the ctx->linux_uid/linux_gid.
*/
got_valid_id:
- rc = 0;
if (sidtype == SIDOWNER)
fattr->cf_uid = fuid;
else
fattr->cf_gid = fgid;
- return rc;
+
+ return 0;
}
int
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] smb: client: Return a status code only as a constant in sid_to_id()
2025-10-10 19:21 [PATCH] smb: client: Return a status code only as a constant in sid_to_id() Markus Elfring
@ 2025-10-11 20:00 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2025-10-11 20:00 UTC (permalink / raw)
To: Markus Elfring
Cc: linux-cifs, samba-technical, Bharath SM, Paulo Alcantara,
Qiujun Huang, Ronnie Sahlberg, Shyam Prasad N, Steve French,
Tom Talpey, LKML, kernel-janitors
merged into cifs-2.6.git for-next
On Fri, Oct 10, 2025 at 2:24 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 10 Oct 2025 21:04:16 +0200
>
> Return a status code without storing it in an intermediate variable.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> fs/smb/client/cifsacl.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c
> index 63b3b1290bed..ce2ebc213a1d 100644
> --- a/fs/smb/client/cifsacl.c
> +++ b/fs/smb/client/cifsacl.c
> @@ -339,7 +339,6 @@ int
> sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
> struct cifs_fattr *fattr, uint sidtype)
> {
> - int rc = 0;
> struct key *sidkey;
> char *sidstr;
> const struct cred *saved_cred;
> @@ -446,12 +445,12 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
> * fails then we just fall back to using the ctx->linux_uid/linux_gid.
> */
> got_valid_id:
> - rc = 0;
> if (sidtype == SIDOWNER)
> fattr->cf_uid = fuid;
> else
> fattr->cf_gid = fgid;
> - return rc;
> +
> + return 0;
> }
>
> int
> --
> 2.51.0
>
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-11 20:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-10 19:21 [PATCH] smb: client: Return a status code only as a constant in sid_to_id() Markus Elfring
2025-10-11 20:00 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®