lkml.org 
[lkml]   [2016]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] MD-RAID: Use seq_putc() in three status functions
    From
    Date
    On 10/16/2016 10:20 AM, SF Markus Elfring wrote:
    > From: Markus Elfring <elfring@users.sourceforge.net>
    > Date: Sun, 16 Oct 2016 10:10:28 +0200
    >
    > A single character (a closing square bracket) should be put into a sequence
    > at the end in these functions.
    > Thus use the corresponding function "seq_putc".
    >
    > This issue was detected also by using the Coccinelle software.
    >
    > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    > ---
    > drivers/md/raid1.c | 2 +-
    > drivers/md/raid10.c | 2 +-
    > drivers/md/raid5.c | 2 +-
    > 3 files changed, 3 insertions(+), 3 deletions(-)
    >
    > diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
    > index 1961d82..fd97f65 100644
    > --- a/drivers/md/raid1.c
    > +++ b/drivers/md/raid1.c
    > @@ -1418,7 +1418,7 @@ static void raid1_status(struct seq_file *seq, struct mddev *mddev)
    > rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_");
    > }
    > rcu_read_unlock();
    > - seq_printf(seq, "]");
    > + seq_putc(seq, ']');
    > }
    >
    > static void raid1_error(struct mddev *mddev, struct md_rdev *rdev)
    > diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
    > index be1a9fc..7490b28 100644
    > --- a/drivers/md/raid10.c
    > +++ b/drivers/md/raid10.c
    > @@ -1499,7 +1499,7 @@ static void raid10_status(struct seq_file *seq, struct mddev *mddev)
    > seq_printf(seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_");
    > }
    > rcu_read_unlock();
    > - seq_printf(seq, "]");
    > + seq_putc(seq, ']');
    > }
    >
    > /* check if there are enough drives for
    > diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
    > index 92ac251..9eb45c4 100644
    > --- a/drivers/md/raid5.c
    > +++ b/drivers/md/raid5.c
    > @@ -7077,7 +7077,7 @@ static void raid5_status(struct seq_file *seq, struct mddev *mddev)
    > seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_");
    > }
    > rcu_read_unlock();
    > - seq_printf (seq, "]");
    > + seq_putc(seq, ']');
    > }
    >
    > static void print_raid5_conf (struct r5conf *conf)
    >
    The point of this patch being ... what?
    Does it improve code? Does it improve anything?

    Cheers,

    Hannes
    --
    Dr. Hannes Reinecke zSeries & Storage
    hare@suse.de +49 911 74053 688
    SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
    GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

    \
     
     \ /
      Last update: 2016-10-16 18:59    [W:12.889 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site