lkml.org 
[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: + locks-new-proc-lockinfo.patch added to -mm tree
From
On Wed, Feb 22, 2012 at 12:06 AM,  <akpm@linux-foundation.org> wrote:
> +static void lockinfo_get_status(struct seq_file *f, struct file_lock *fl,

All caps sucks.

> +       if (fl->fl_type & LOCK_MAND) {
> +               seq_printf(f, "Access:\t\t %s\n",
> +                          (fl->fl_type & LOCK_READ)
> +                          ? (fl->fl_type & LOCK_WRITE) ? "RW   " : "READ "
> +                          : (fl->fl_type & LOCK_WRITE) ? "WRITE" : "NONE ");

I think using one of --, r-, -w, rw is nicer.
Trailing whitespace, why?

> +       } else {
> +               seq_printf(f, "Access:\t\t %s\n",
> +                          (lease_breaking(fl))
> +                          ? (fl->fl_type & F_UNLCK) ? "UNLCK" : "READ "
> +                          : (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");

Trailing whitespace.

> +       if (IS_POSIX(fl)) {
> +               if (fl->fl_end == OFFSET_MAX)
> +                       seq_printf(f, "Start-end:\t %Ld-EOF\n\n", fl->fl_start);
> +               else
> +                       seq_printf(f, "Start-end:\t %Ld-%Ld\n\n", fl->fl_start, fl->fl_end);
> +       } else {
> +               seq_printf(f, "Start-end:\t 0-EOF\n\n");

Separate start/end or range, if you want to keep it on one line.
\
 
 \ /
  Last update: 2012-02-23 12:57    [W:0.024 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site