From: Markus Elfring <Markus.Elfring@web.de>
To: x86@kernel.org, kernel-janitors@vger.kernel.org,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86/resctrl: Use seq_putc() in two functions
Date: Sat, 13 Jul 2024 11:00:27 +0200 [thread overview]
Message-ID: <d4be0dc8-f6db-4bf1-bb6d-ccff161dfde9@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 Jul 2024 10:43:14 +0200
Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc”.
This issue was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++--
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
index 50fa1fe9a073..dce68f19c29d 100644
--- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
+++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
@@ -452,7 +452,7 @@ static void show_doms(struct seq_file *s, struct resctrl_schema *schema, int clo
seq_printf(s, "%*s:", max_name_width, schema->name);
list_for_each_entry(dom, &r->ctrl_domains, hdr.list) {
if (sep)
- seq_puts(s, ";");
+ seq_putc(s, ';');
if (is_mba_sc(r))
ctrl_val = dom->mbps_val[closid];
@@ -464,7 +464,7 @@ static void show_doms(struct seq_file *s, struct resctrl_schema *schema, int clo
ctrl_val);
sep = true;
}
- seq_puts(s, "\n");
+ seq_putc(s, '\n');
}
int rdtgroup_schemata_show(struct kernfs_open_file *of,
diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index d7163b764c62..d4e216073e7a 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -1605,7 +1605,7 @@ static int mbm_config_show(struct seq_file *s, struct rdt_resource *r, u32 evtid
list_for_each_entry(dom, &r->mon_domains, hdr.list) {
if (sep)
- seq_puts(s, ";");
+ seq_putc(s, ';');
memset(&mon_info, 0, sizeof(struct mon_config_info));
mon_info.evtid = evtid;
@@ -1614,7 +1614,7 @@ static int mbm_config_show(struct seq_file *s, struct rdt_resource *r, u32 evtid
seq_printf(s, "%d=0x%02x", dom->hdr.id, mon_info.mon_config);
sep = true;
}
- seq_puts(s, "\n");
+ seq_putc(s, '\n');
mutex_unlock(&rdtgroup_mutex);
cpus_read_unlock();
--
2.45.2
next reply other threads:[~2024-07-13 9:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 9:00 Markus Elfring [this message]
2024-07-16 21:43 ` Reinette Chatre
2024-07-16 22:07 ` Christian Heusel
2024-07-17 6:58 ` Markus Elfring
2024-07-17 5:12 ` [PATCH] " Christophe JAILLET
2024-07-17 6:42 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4be0dc8-f6db-4bf1-bb6d-ccff161dfde9@web.de \
--to=markus.elfring@web.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®