From: Dan Carpenter <error27@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: Steve French <sfrench@samba.org>,
linux-cifs@vger.kernel.org,
Shyam Prasad N <sprasad@microsoft.com>,
Paulo Alcantara <pc@manguebit.org>,
kernel-janitors@vger.kernel.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org, Tom Talpey <tom@talpey.com>,
Bharath SM <bharathsm@microsoft.com>
Subject: Re: [PATCH] smb/client: clean up a type issue in cifs_xattr_get()
Date: Fri, 12 Jun 2026 14:27:30 +0300 [thread overview]
Message-ID: <aivtIut3kQ5s3GKM@stanley.mountain> (raw)
In-Reply-To: <CAH2r5mutN9yDPF8Q=z_GYbgAzJFS6OE+2zBd8na9zY1Wbt3gyg@mail.gmail.com>
On Thu, Jun 11, 2026 at 03:33:50PM -0500, Steve French wrote:
> Doesn't your patch need a cast in the following code in xattr.c since
> it returns a ssize_t and you changed rc to int with your patch?
>
> 315 if (pTcon->ses->server->ops->query_all_EAs)
> 316 rc =
> pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
> 317 full_path, name, value, size, cifs_sb);
>
It's not required. The ->query_all_EAs() pointer returns ssize_t but
the two functions which implement ->query_all_EAs(), CIFSSMBQAllEAs()
and smb2_query_eas() return an rc variable which is an int.
I would tend to leave it out, but if you want I can add it if you
would prefer.
My real motivation for making this change is that we have an
"acllen = -ERANGE;" assignment where acllen is a u32. Then we
store the -ERANGE in a signed long and Smatch triggers a warning
at that point. But then we truncate away the upper 32 bits so it
ends being fine.
regards,
dan carpenter
prev parent reply other threads:[~2026-06-12 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 7:34 [PATCH] smb/client: clean up a type issue in cifs_xattr_get() Dan Carpenter
2026-06-11 20:33 ` Steve French
2026-06-12 11:27 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aivtIut3kQ5s3GKM@stanley.mountain \
--to=error27@gmail.com \
--cc=bharathsm@microsoft.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox