From: Hannes Reinecke Date: Sun, 16 Oct 2016 16:58:22 +0000 Subject: Re: [PATCH] MD-RAID: Use seq_putc() in three status functions Message-Id: <688764a4-072d-2faf-37ba-a222b190a5d9@suse.de> List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <786843ef-4b6f-eb04-7326-2f6f5b408826@users.sourceforge.net> <92c52f1d-d151-cea6-e9ac-31378e6862d0@users.sourceforge.net> <1475771699.1914.10.camel@perches.com> <77fb6fdc-7480-8607-0af1-42f73c125b9d@users.sourceforge.net> In-Reply-To: <77fb6fdc-7480-8607-0af1-42f73c125b9d@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: SF Markus Elfring , linux-raid@vger.kernel.org, Christoph Hellwig , Guoqing Jiang , Jens Axboe , Joe Perches , Mike Christie , Neil Brown , Shaohua Li , Tomasz Majchrzak Cc: LKML , kernel-janitors@vger.kernel.org On 10/16/2016 10:20 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 16 Oct 2016 10:10:28 +0200 > > A single character (a closing square bracket) should be put into a sequen= ce > 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 > --- > 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, stru= ct 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, str= uct 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, stru= ct 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 --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg) -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html