* [PATCH 1/1] fs/locks.c: replace seq_printf by seq_puts
@ 2014-05-03 20:28 Fabian Frederick
2014-05-04 1:08 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-03 20:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Layton, Viro, akpm
Replace seq_printf where possible
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/locks.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index e663aea..78ac209 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2411,31 +2411,31 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
seq_printf(f, "%lld:%s ", id, pfx);
if (IS_POSIX(fl)) {
if (fl->fl_flags & FL_ACCESS)
- seq_printf(f, "ACCESS");
+ seq_puts(f, "ACCESS");
else if (IS_OFDLCK(fl))
- seq_printf(f, "OFDLCK");
+ seq_puts(f, "OFDLCK");
else
- seq_printf(f, "POSIX ");
+ seq_puts(f, "POSIX ");
seq_printf(f, " %s ",
(inode == NULL) ? "*NOINODE*" :
mandatory_lock(inode) ? "MANDATORY" : "ADVISORY ");
} else if (IS_FLOCK(fl)) {
if (fl->fl_type & LOCK_MAND) {
- seq_printf(f, "FLOCK MSNFS ");
+ seq_puts(f, "FLOCK MSNFS ");
} else {
- seq_printf(f, "FLOCK ADVISORY ");
+ seq_puts(f, "FLOCK ADVISORY ");
}
} else if (IS_LEASE(fl)) {
- seq_printf(f, "LEASE ");
+ seq_puts(f, "LEASE ");
if (lease_breaking(fl))
- seq_printf(f, "BREAKING ");
+ seq_puts(f, "BREAKING ");
else if (fl->fl_file)
- seq_printf(f, "ACTIVE ");
+ seq_puts(f, "ACTIVE ");
else
- seq_printf(f, "BREAKER ");
+ seq_puts(f, "BREAKER ");
} else {
- seq_printf(f, "UNKNOWN UNKNOWN ");
+ seq_puts(f, "UNKNOWN UNKNOWN ");
}
if (fl->fl_type & LOCK_MAND) {
seq_printf(f, "%s ",
@@ -2467,7 +2467,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
else
seq_printf(f, "%Ld %Ld\n", fl->fl_start, fl->fl_end);
} else {
- seq_printf(f, "0 EOF\n");
+ seq_puts(f, "0 EOF\n");
}
}
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] fs/locks.c: replace seq_printf by seq_puts
2014-05-03 20:28 [PATCH 1/1] fs/locks.c: replace seq_printf by seq_puts Fabian Frederick
@ 2014-05-04 1:08 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2014-05-04 1:08 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Viro, akpm
On Sat, 3 May 2014 22:28:43 +0200
Fabian Frederick <fabf@skynet.be> wrote:
> Replace seq_printf where possible
>
> Cc: Jeff Layton <jlayton@redhat.com>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/locks.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index e663aea..78ac209 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2411,31 +2411,31 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
> seq_printf(f, "%lld:%s ", id, pfx);
> if (IS_POSIX(fl)) {
> if (fl->fl_flags & FL_ACCESS)
> - seq_printf(f, "ACCESS");
> + seq_puts(f, "ACCESS");
> else if (IS_OFDLCK(fl))
> - seq_printf(f, "OFDLCK");
> + seq_puts(f, "OFDLCK");
> else
> - seq_printf(f, "POSIX ");
> + seq_puts(f, "POSIX ");
>
> seq_printf(f, " %s ",
> (inode == NULL) ? "*NOINODE*" :
> mandatory_lock(inode) ? "MANDATORY" : "ADVISORY ");
> } else if (IS_FLOCK(fl)) {
> if (fl->fl_type & LOCK_MAND) {
> - seq_printf(f, "FLOCK MSNFS ");
> + seq_puts(f, "FLOCK MSNFS ");
> } else {
> - seq_printf(f, "FLOCK ADVISORY ");
> + seq_puts(f, "FLOCK ADVISORY ");
> }
> } else if (IS_LEASE(fl)) {
> - seq_printf(f, "LEASE ");
> + seq_puts(f, "LEASE ");
> if (lease_breaking(fl))
> - seq_printf(f, "BREAKING ");
> + seq_puts(f, "BREAKING ");
> else if (fl->fl_file)
> - seq_printf(f, "ACTIVE ");
> + seq_puts(f, "ACTIVE ");
> else
> - seq_printf(f, "BREAKER ");
> + seq_puts(f, "BREAKER ");
> } else {
> - seq_printf(f, "UNKNOWN UNKNOWN ");
> + seq_puts(f, "UNKNOWN UNKNOWN ");
> }
> if (fl->fl_type & LOCK_MAND) {
> seq_printf(f, "%s ",
> @@ -2467,7 +2467,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
> else
> seq_printf(f, "%Ld %Ld\n", fl->fl_start, fl->fl_end);
> } else {
> - seq_printf(f, "0 EOF\n");
> + seq_puts(f, "0 EOF\n");
> }
> }
>
Looks good to me. I'll plan to merge it for v3.16.
Thanks!
--
Jeff Layton <jlayton@poochiereds.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-04 1:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 20:28 [PATCH 1/1] fs/locks.c: replace seq_printf by seq_puts Fabian Frederick
2014-05-04 1:08 ` Jeff Layton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.