From patchwork Mon Jul 15 09:20:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13733156 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89AD5185E5B; Mon, 15 Jul 2024 09:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721035252; cv=none; b=HqU6MUqntlajq1J8XjWWDbxEYymLqeSbuo64Rx1OlzctYXOt0z2NSrgscqCe6SuFbvPnuf2HPDbtZuzsmJNkC3Tm0+Yq7Mul/tRhOLirTQG70llC9N0IDVu+X42tkiq3GEqitivYFAyM9lw3i1s63JSzwRCnX0So+Ktu0ApkFqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721035252; c=relaxed/simple; bh=eTRBEPkS2r87hNj5UkLCu1loixz5oChnDT5vx9ZswWw=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=olLPKsGNQXr/meYGthLf/pT3nL9Iq4MqrLeu5XVbIzsNy4AEIHcq+0Pr0P5VkKX/ebi7NQj/OMwxqD7Xw6LOIU1kRUg5bKTlGlfP3ZdXXOd5Si0lodUFE9DiWiltet0BFAZzpxkjhwuYEm0lrswj/EiYI1Nq0qWS59clPv25hfg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=skcF89Tc; arc=none smtp.client-ip=212.227.15.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="skcF89Tc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1721035229; x=1721640029; i=markus.elfring@web.de; bh=h5J4xnTRRczNmA4SY9gfKeB3SBi2lBm0xtml3mDw2LU=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:From: Subject:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=skcF89TcJn6FKgVZEzX+cCIs7of3bzdp4RQpo/UUt3+bEwFVx7x1o7G5ZbW/PCqp 0ZbD7zPYCKvwZKj+7INxy86WumWnrvDIQUDrr77APVOxwV2CPfyfxsCu7CEoTGZmP Pg//dlCry5CWYCcwsbPCbgHJVt3G1qokcA83z5QeM5EwK7v4XV3keApPNOi79sYWu DKiO4149pDmyjphYEEVOoGkCQabA+anBd7VPKwZtPhIG2HEV3Z/+5WdZ653vGoH3r TcuSfR89XxASQrB0BDzuNDRskt3BxrX8p2ROtqSCcx1x5B1ng+h1+PLGZi/oIf68I SKc7UTpnnN/gXBA9hg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.82.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mfc4q-1rrlCO3Yk4-00hHPN; Mon, 15 Jul 2024 11:20:28 +0200 Message-ID: Date: Mon, 15 Jul 2024 11:20:27 +0200 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: bpf@vger.kernel.org, kernel-janitors@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Christophe Jaillet , Daniel Borkmann , Eduard Zingerman , Hao Luo , Jiri Olsa , John Fastabend , KP Singh , Martin KaFai Lau , Song Liu , Stanislav Fomichev , Yonghong Song Cc: LKML From: Markus Elfring Subject: [PATCH] bpf: Simplify character output in seq_print_delegate_opts() X-Provags-ID: V03:K1:3cIevsQjGB9LkZ4UtKg/WHmhtrHXPpk3H78A16xjMuEDTnWYs1G oo+o1TLOx0EZ04WW/RxbiXTKvakzKH5I9TPu++LyibC380zAt84j6UeTwDz6uqQI2Aq5vV3 Pit47qm8vn/RISSejp2KPWpLdAebLoF/LDFfGOl2n0hK9IlJcc7U1XSFewIzsAqJ/jkeAWx GCTEgjgG1CcJDKjS7LqEw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:41ZoitEmC68=;dx0jI6QkWrMTUcENTtTJbIVoQLP v9KSdawl8hNi9dUfWAkrQdy1Q14j+STscKcjvxstw4orPVMstRYPX/H5TGmwJrvmSkWiAFWES t/eifFVwvOMeR1BL9D30EcvlC1OGJ2GYFtTKSqFAAkz9q37K0PxiRtgPxs1etRVkD/BwRByPn Wwba5whkBsONZN7VXJNVZi5ImvSedLdsJO5qlsiCkR8JhpYgZb0LSgsCgfekOSnfDBAoC7elN s/pro39uLvY97MwW8AmR2IVoGaef4ypIHxDUU9gaCWWmalLZf0mjUOAHiYk5+m6ru6X7PCE33 K8Fc4SZZiUitxeEFWQIkdcKvQ1KJaA2eDPrBM/IiKZrTK834wWzWsNXjOHN2X25NXSfVpWjhX 7BxIKqMBz6TJdlWKoV3L3uFybuhl7c6gPRnGVVxwKSXWcdX6c/sK8cZwSXJpgiE+8pMjkXMTx 0Zx0GzT9LA9cdbFDOfqEYTA2+Y75Upl5fORmkMtDr9CamlNencZJUXuuZFvDXttpZwiWIHiPg e4uie2ZxSfWCoCYa1wrEtjMDGKeBBndOiEKz3lYQTQ/TGMC/iOksG9PA92G+p/miRGkq8ey5d NsdVXm8vtboIuaf9cpMrFynclP/eESSKKQVMmLpZdNm4ZZ7LhhK/Fx9G/TQp9KZb1PyUURWBV xVn3u8Y6CowoVgcNUVX4H8WACiDhyg7Mx7slRwgK0xerEzBSrlcjiM3RCix7Kp0vHvDuzEs2t t6SBDeUDRJ/QcjmB8J/jxrTxLVJfwvzEeCujG02X3fW42a313Rzxe1+7OkpEkUxAEB9zlCzke VDSLQLbXzdxKHdOLy+A0CvgQ== X-Patchwork-Delegate: bpf@iogearbox.net From: Markus Elfring Date: Mon, 15 Jul 2024 11:12:30 +0200 Single characters should be put into a sequence. Thus use the corresponding function “seq_putc” for two selected calls. This issue was transformed by using the Coccinelle software. Suggested-by: Christophe Jaillet Signed-off-by: Markus Elfring --- kernel/bpf/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.45.2 diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index af5d2ffadd70..d8fc5eba529d 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -709,10 +709,10 @@ static void seq_print_delegate_opts(struct seq_file *m, msk = 1ULL << e->val; if (delegate_msk & msk) { /* emit lower-case name without prefix */ - seq_printf(m, "%c", first ? '=' : ':'); + seq_putc(m, first ? '=' : ':'); name += pfx_len; while (*name) { - seq_printf(m, "%c", tolower(*name)); + seq_putc(m, tolower(*name)); name++; }