* fs/nfsd/nfs4state.c use of "\%s"
@ 2019-10-03 0:17 Randy Dunlap
2019-10-03 16:42 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2019-10-03 0:17 UTC (permalink / raw)
To: Linux FS Devel, J. Bruce Fields, J. Bruce Fields; +Cc: linux-nfs, Al Viro
Hi Bruce,
In commit 78599c42ae3c70300a38b0d1271a85bc9f2d704a
(nfsd4: add file to display list of client's opens), some of the %s printk
specifiers are \-escaped:
+ seq_printf(s, "access: \%s\%s, ",
+ access & NFS4_SHARE_ACCESS_READ ? "r" : "-",
+ access & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
+ seq_printf(s, "deny: \%s\%s, ",
+ deny & NFS4_SHARE_ACCESS_READ ? "r" : "-",
+ deny & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
sparse complains about these, as does gcc when used with --pedantic.
sparse says:
../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%'
../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%'
../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%'
../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%'
Is this just a typo?
Please just fix it.
thanks,
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fs/nfsd/nfs4state.c use of "\%s"
2019-10-03 0:17 fs/nfsd/nfs4state.c use of "\%s" Randy Dunlap
@ 2019-10-03 16:42 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2019-10-03 16:42 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Linux FS Devel, J. Bruce Fields, linux-nfs, Al Viro
On Wed, Oct 02, 2019 at 05:17:27PM -0700, Randy Dunlap wrote:
> Hi Bruce,
>
> In commit 78599c42ae3c70300a38b0d1271a85bc9f2d704a
> (nfsd4: add file to display list of client's opens), some of the %s printk
> specifiers are \-escaped:
>
> + seq_printf(s, "access: \%s\%s, ",
> + access & NFS4_SHARE_ACCESS_READ ? "r" : "-",
> + access & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
> + seq_printf(s, "deny: \%s\%s, ",
> + deny & NFS4_SHARE_ACCESS_READ ? "r" : "-",
> + deny & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
>
>
> sparse complains about these, as does gcc when used with --pedantic.
> sparse says:
>
> ../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%'
> ../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%'
> ../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%'
> ../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%'
>
> Is this just a typo?
Yes, weird, I wonder how that crept in.
Patch queued up for 5.5, thanks.
--b.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-03 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-03 0:17 fs/nfsd/nfs4state.c use of "\%s" Randy Dunlap
2019-10-03 16:42 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).