From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH] atm/clip: Use seq_puts() in svc_addr() Date: Sat, 6 Jan 2018 22:44:08 +0100 Message-ID: <97636808-1d9f-d196-ebce-fbd2505c50e2@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: LKML , kernel-janitors@vger.kernel.org To: netdev@vger.kernel.org, Bhumika Goyal , "David S. Miller" , David Windsor , Elena Reshetova , Hans Liljestrand , Johannes Berg , Kees Cook , Roopa Prabhu Return-path: Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Markus Elfring Date: Sat, 6 Jan 2018 22:34:12 +0100 Two strings should be quickly put into a sequence by two function calls. Thus use the function "seq_puts" instead of "seq_printf". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/atm/clip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/atm/clip.c b/net/atm/clip.c index d4f6029d5109..62a852165b19 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -708,11 +708,11 @@ static void svc_addr(struct seq_file *seq, struct sockaddr_atmsvc *addr) static int e164[] = { 1, 8, 4, 6, 1, 0 }; if (*addr->sas_addr.pub) { - seq_printf(seq, "%s", addr->sas_addr.pub); + seq_puts(seq, addr->sas_addr.pub); if (*addr->sas_addr.prv) seq_putc(seq, '+'); } else if (!*addr->sas_addr.prv) { - seq_printf(seq, "%s", "(none)"); + seq_puts(seq, "(none)"); return; } if (*addr->sas_addr.prv) { -- 2.15.1