Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754441AbcJPIU5 (ORCPT ); Sun, 16 Oct 2016 04:20:57 -0400 Received: from mout.web.de ([212.227.17.11]:51725 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbcJPIUr (ORCPT ); Sun, 16 Oct 2016 04:20:47 -0400 Subject: [PATCH] MD-RAID: Use seq_putc() in three status functions To: linux-raid@vger.kernel.org, Christoph Hellwig , Guoqing Jiang , Jens Axboe , Joe Perches , Mike Christie , Neil Brown , Shaohua Li , Tomasz Majchrzak 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> Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <77fb6fdc-7480-8607-0af1-42f73c125b9d@users.sourceforge.net> Date: Sun, 16 Oct 2016 10:20:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1475771699.1914.10.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:owSBmFRO1roY32FYpz/mgNSUOK9dyRDSzypVHYiFQG12djaZmZR gZ/N2EmeR/deMlKVTWbI5Gmg780oxO+qGVVAp3OgvV4XCAfMJ4YytO/w0Xt3umRvt3pH7lg J+VJVllEaL/4IgjjOHpVfxMSaNuNCQT322khqa1jkh0/p/9AAkqApunA/vJUWVl/fJmwry/ sW2UtKqzlGzRWHe9D6jvA== X-UI-Out-Filterresults: notjunk:1;V01:K0:LPMCQpWxttQ=:M7cKgM8MDmJrMuqAhrPt5/ ZAfalu8WyHk5rNwYGRtTM3r8CPzBKuBADsUGTSpRCDDbTVctqnu3f2+bt4Vb6aJJZZ+iCO2EU JP34+vd1cZfSGxH2FBGqqTT2czNpuK9TRVSmRiz8VclgW+Q11wNrxD6nU1hGydGbMr6e9lqzH MpetlhyWou/mJmoo+pamG1whZ+p8AJqQy6OI3feIcsR0Jm85UF8ZjPrxh1ioH3TO56yVllriQ 2n2IuKINytYCpFAaapozkIyFK6fqiDBAguvmqBY497hnT1JukWZ4zHmPOXagd/jd8wuG61VqX rE16A/kMCgh1WjM1r2lSexoaO2jhO+uNxVECHnhBLfs/YQvLn08XkVEu5Tloo5dBJYok+8VNg oqGDzta2SNBbjiUFQ71qcpG4k86Q1j80pTuRIwYbHWEd4Mv8xIQf6H0ucko/1L1LxSv9qK1TP FtWxEslszRIxdOuHvLR2rN5K/lAYG7hFgryQv8gOGOKX8KczM5DBoPXvWfme8gYwbQLP5jv7w Bq5BARupmYM+2Aj7c4aLIutAcZn+GcvlmhFyO9s8oq3xusOZXXU4yEKz/39TkW3YGFll24f+1 Y+ugeHH3Z1eb635rUR6cBEPbkjPVwxO455cq4ssIkBfz2G2xSVROHZfSL1Oiu9qs+UcSExcFK 8kEpxgaBGjEuHNwsbJm7FTFbShjVB28AKb7WufRPTdU+SYTb187iAyUaU+UGU3YFmrcx9Y1Oi mO/ysgg65JCmZj76sJjSKdBSrFiiZZmcIEyOSKcv9x20xofPenSGrQ+cr9ovFemrOoQG0ey8U eR1fY+F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1808 Lines: 57 From: Markus Elfring 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 --- 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) -- 2.10.1