From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbdEJIs0 (ORCPT ); Wed, 10 May 2017 04:48:26 -0400 Received: from smtp-out4.electric.net ([192.162.216.195]:53544 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbdEJIsY (ORCPT ); Wed, 10 May 2017 04:48:24 -0400 From: David Laight To: "'SF Markus Elfring'" , "linux-hams@vger.kernel.org" , "netdev@vger.kernel.org" , "David S. Miller" , Javier Martinez Canillas , Jean-Paul Roubelat CC: LKML , "kernel-janitors@vger.kernel.org" Subject: RE: [PATCH 1/4] hamradio: Combine two seq_printf() calls into one in yam_seq_show() Thread-Topic: [PATCH 1/4] hamradio: Combine two seq_printf() calls into one in yam_seq_show() Thread-Index: AQHSyM+/DGrqAYybnUy2Nq57al2v46HtQhYg Date: Wed, 10 May 2017 08:48:13 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFE852F@AcuExch.aculab.com> References: <4c5c939a-bd55-7b88-8e41-49f5544b7658@users.sourceforge.net> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v4A8mU1N003810 From: SF Markus Elfring > Sent: 09 May 2017 15:22 > A bit of data was put into a sequence by two separate function calls. > Print the same data by a single function call instead. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/net/hamradio/yam.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c > index b6891ada1d7b..542f1e511df1 100644 > --- a/drivers/net/hamradio/yam.c > +++ b/drivers/net/hamradio/yam.c > @@ -830,8 +830,7 @@ static int yam_seq_show(struct seq_file *seq, void *v) > seq_printf(seq, " RxFrames %lu\n", dev->stats.rx_packets); > seq_printf(seq, " TxInt %u\n", yp->nb_mdint); > seq_printf(seq, " RxInt %u\n", yp->nb_rxint); > - seq_printf(seq, " RxOver %lu\n", dev->stats.rx_fifo_errors); > - seq_printf(seq, "\n"); > + seq_printf(seq, " RxOver %lu\n\n", dev->stats.rx_fifo_errors); > return 0; The code was consistently (and probably deliberately) using one seq_printf() call for each line so that the source looks 'a bit like' the output. These changes are all stupid. David