Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753825AbeAFVo4 (ORCPT + 1 other); Sat, 6 Jan 2018 16:44:56 -0500 Received: from mout.web.de ([212.227.15.3]:57716 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbeAFVox (ORCPT ); Sat, 6 Jan 2018 16:44:53 -0500 To: netdev@vger.kernel.org, Bhumika Goyal , "David S. Miller" , David Windsor , Elena Reshetova , Hans Liljestrand , Johannes Berg , Kees Cook , Roopa Prabhu Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] atm/clip: Use seq_puts() in svc_addr() Message-ID: <97636808-1d9f-d196-ebce-fbd2505c50e2@users.sourceforge.net> Date: Sat, 6 Jan 2018 22:44:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:hBoRuuZAC1umsNXy2gxDXXyzZqQuwv4EddKC0HRBsm1F1Y+nggc /2iM1J2ZKqOyr9NlfQ9yMruqTLZgMznylfuKDwc3h3k/ddJ/mZ+Hn68L6WrlXtu5kNGyISR L40F70oYqd+FpWbky+SqkEQtL/cOph0lvrWQkgxujNgTryyxmXYqV8+7i6rAv8fmPiODkpf gQ8L4iP8h6S5q3/aTyAwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:zcYpuMVQGmw=:MyulsaZ5iOXwIb1qGgPeE8 1ilOuxCYi4HyOQjjujqEc5xDLTJeHw9oxY9HEuVMxZLbsLW/+7tuYZ76Ba3pmewa81JQ/ocOl anzy8B6DOyJaHug62VtFyQVAv01zOFhUPHxKPDJUa5DLkOgsnZyvWKHZjB1IrsmdDAKNZd5uy e/JzQ7BEy5aA907hQRF/vd2qq9DaCVv5IxjZspSzc4PmCG6Ru4XmFZ/xrh1TCoVuSBOCDSWzN cmgDs6D3LEHaLYE6g2Hn5G9Eic6e+cBEGQFBYjXgUnibolqlBqiPjpkXCS0Ylh21K4JP2Ph+k WyqFGYUFDTTceOPE/6rYzvE4BpJ02QbbbQQEh7SXnZMBUW5+eOWJwcU43URR6eXXySD+/EHyG 8CQ3jf43uEZ36jOLyFjuOMNpBy6WIT3F/pf5Mbnev38x5UGEze+SJ/q9iBSNx+z7UfRJYJli8 Vh/XyOAsSDYuy6L7pEaL9FJ5f0x6+2u40gFrV7ymDKZtE1pdDUIvt9xv8aSjeNOxPM5inM9HR AXiwghqsWfHypEV91sBpqhF01V9FV7+R7eUdjtdf19CLmMMiGoH343zqo8Vor/pYc1e2fi54U drRuF79qTKLdE1ZrKEn0qGzkFJt6jh7XlOeBZ1WYAs0X1Cr1ZzXDJjuKAmRJkwPBs2+y8A/br cJCWzaT7fRWd6JwTc83GibiCNG6iTaqAtG9nYrFCMB3JwbvvbdcAAvppCvTxgRwXa4N2s5/4D ryMw7nzcNhI185TwgvJrN9F4f1Meq8Fb93fi6QYzDbE4dRZEpei8dZA7jSXcbwhBjNzFWWLmH YhfBNQAiBQ8tBWGxaspe8mEcSxu9Z3FowdSPMzJV6a0ZzTcLq0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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