* [PATCH] KVM: x86:Fix warnings in debugfs.c [not found] <tencent_5FEF30EB273BF931FF82DB522CA8CB13A307@qq.com> @ 2023-07-12 3:08 ` shijie001 2023-07-18 6:43 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 2+ messages in thread From: shijie001 @ 2023-07-12 3:08 UTC (permalink / raw) To: tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, kvm, linux-kernel The following checkpatch warning is removed: WARNING: Prefer seq_puts to seq_printf Signed-off-by: Jie Shi <shijie001@208suo.com> --- arch/x86/kvm/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/debugfs.c b/arch/x86/kvm/debugfs.c index ee8c4c3496ed..a3e118397aa3 100644 --- a/arch/x86/kvm/debugfs.c +++ b/arch/x86/kvm/debugfs.c @@ -133,20 +133,20 @@ static int kvm_mmu_rmaps_stat_show(struct seq_file *m, void *v) mutex_unlock(&kvm->slots_lock); /* index=0 counts no rmap; index=1 counts 1 rmap */ - seq_printf(m, "Rmap_Count:\t0\t1\t"); + seq_puts(m, "Rmap_Count:\t0\t1\t"); for (i = 2; i < RMAP_LOG_SIZE; i++) { j = 1 << (i - 1); k = (1 << i) - 1; seq_printf(m, "%d-%d\t", j, k); } - seq_printf(m, "\n"); + seq_puts(m, "\n"); for (i = 0; i < KVM_NR_PAGE_SIZES; i++) { seq_printf(m, "Level=%s:\t", kvm_lpage_str[i]); cur = log[i]; for (j = 0; j < RMAP_LOG_SIZE; j++) seq_printf(m, "%d\t", cur[j]); - seq_printf(m, "\n"); + seq_puts(m, "\n"); } ret = 0; ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86:Fix warnings in debugfs.c 2023-07-12 3:08 ` [PATCH] KVM: x86:Fix warnings in debugfs.c shijie001 @ 2023-07-18 6:43 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 2+ messages in thread From: Philippe Mathieu-Daudé @ 2023-07-18 6:43 UTC (permalink / raw) To: shijie001, tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, kvm, linux-kernel Hi, On 12/7/23 05:08, shijie001@208suo.com wrote: > The following checkpatch warning is removed: > WARNING: Prefer seq_puts to seq_printf > > Signed-off-by: Jie Shi <shijie001@208suo.com> > --- > arch/x86/kvm/debugfs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/debugfs.c b/arch/x86/kvm/debugfs.c > index ee8c4c3496ed..a3e118397aa3 100644 > --- a/arch/x86/kvm/debugfs.c > +++ b/arch/x86/kvm/debugfs.c > @@ -133,20 +133,20 @@ static int kvm_mmu_rmaps_stat_show(struct seq_file > *m, void *v) > mutex_unlock(&kvm->slots_lock); > > /* index=0 counts no rmap; index=1 counts 1 rmap */ > - seq_printf(m, "Rmap_Count:\t0\t1\t"); > + seq_puts(m, "Rmap_Count:\t0\t1\t"); > for (i = 2; i < RMAP_LOG_SIZE; i++) { > j = 1 << (i - 1); > k = (1 << i) - 1; > seq_printf(m, "%d-%d\t", j, k); > } > - seq_printf(m, "\n"); > + seq_puts(m, "\n"); If you really want to clean this, then seq_putc() is more appropriate. > > for (i = 0; i < KVM_NR_PAGE_SIZES; i++) { > seq_printf(m, "Level=%s:\t", kvm_lpage_str[i]); > cur = log[i]; > for (j = 0; j < RMAP_LOG_SIZE; j++) > seq_printf(m, "%d\t", cur[j]); > - seq_printf(m, "\n"); > + seq_puts(m, "\n"); Ditto. > } > > ret = 0; ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-18 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_5FEF30EB273BF931FF82DB522CA8CB13A307@qq.com>
2023-07-12 3:08 ` [PATCH] KVM: x86:Fix warnings in debugfs.c shijie001
2023-07-18 6:43 ` Philippe Mathieu-Daudé
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®